You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2016/11/10 16:04:15 UTC

[1/3] ignite git commit: IGNITE-4183: ODBC Fixed null-values fetching issue.

Repository: ignite
Updated Branches:
  refs/heads/ignite-4154 d5465c753 -> 4608a30b6


IGNITE-4183: ODBC Fixed null-values fetching issue.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ac660dca
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ac660dca
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ac660dca

Branch: refs/heads/ignite-4154
Commit: ac660dcaa5bf8eb20e7dd4e442e97c1cf548a827
Parents: d88f422
Author: Igor Sapego <is...@gridgain.com>
Authored: Wed Nov 9 15:29:06 2016 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Wed Nov 9 15:29:06 2016 +0300

----------------------------------------------------------------------
 .../platforms/cpp/odbc-test/include/test_type.h |  42 ++++--
 .../cpp/odbc-test/src/queries_test.cpp          | 139 +++++++++++++++++--
 .../cpp/odbc-test/src/sql_outer_join_test.cpp   |   2 +-
 .../odbc/src/app/application_data_buffer.cpp    |  34 ++++-
 4 files changed, 187 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ac660dca/modules/platforms/cpp/odbc-test/include/test_type.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/include/test_type.h b/modules/platforms/cpp/odbc-test/include/test_type.h
index 2a4a979..0e08251 100644
--- a/modules/platforms/cpp/odbc-test/include/test_type.h
+++ b/modules/platforms/cpp/odbc-test/include/test_type.h
@@ -28,6 +28,7 @@ namespace ignite
     struct TestType
     {
         TestType() :
+            allNulls(false),
             i8Field(0),
             i16Field(0),
             i32Field(0),
@@ -45,6 +46,7 @@ namespace ignite
             int64_t i64Field, const std::string& strField, float floatField,
             double doubleField, bool boolField, const Guid& guidField,
             const Date& dateField, const Timestamp& timestampField) :
+            allNulls(false),
             i8Field(i8Field),
             i16Field(i16Field),
             i32Field(i32Field),
@@ -60,6 +62,7 @@ namespace ignite
             // No-op.
         }
 
+        bool allNulls;
         int8_t i8Field;
         int16_t i16Field;
         int32_t i32Field;
@@ -91,17 +94,34 @@ namespace ignite
 
             void Write(BinaryWriter& writer, TestType obj)
             {
-                writer.WriteInt8("i8Field", obj.i8Field);
-                writer.WriteInt16("i16Field", obj.i16Field);
-                writer.WriteInt32("i32Field", obj.i32Field);
-                writer.WriteInt64("i64Field", obj.i64Field);
-                writer.WriteString("strField", obj.strField);
-                writer.WriteFloat("floatField", obj.floatField);
-                writer.WriteDouble("doubleField", obj.doubleField);
-                writer.WriteBool("boolField", obj.boolField);
-                writer.WriteGuid("guidField", obj.guidField);
-                writer.WriteDate("dateField", obj.dateField);
-                writer.WriteTimestamp("timestampField", obj.timestampField);
+                if (!obj.allNulls)
+                {
+                    writer.WriteInt8("i8Field", obj.i8Field);
+                    writer.WriteInt16("i16Field", obj.i16Field);
+                    writer.WriteInt32("i32Field", obj.i32Field);
+                    writer.WriteInt64("i64Field", obj.i64Field);
+                    writer.WriteString("strField", obj.strField);
+                    writer.WriteFloat("floatField", obj.floatField);
+                    writer.WriteDouble("doubleField", obj.doubleField);
+                    writer.WriteBool("boolField", obj.boolField);
+                    writer.WriteGuid("guidField", obj.guidField);
+                    writer.WriteDate("dateField", obj.dateField);
+                    writer.WriteTimestamp("timestampField", obj.timestampField);
+                }
+                else
+                {
+                    writer.WriteNull("i8Field");
+                    writer.WriteNull("i16Field");
+                    writer.WriteNull("i32Field");
+                    writer.WriteNull("i64Field");
+                    writer.WriteNull("strField");
+                    writer.WriteNull("floatField");
+                    writer.WriteNull("doubleField");
+                    writer.WriteNull("boolField");
+                    writer.WriteNull("guidField");
+                    writer.WriteNull("dateField");
+                    writer.WriteNull("timestampField");
+                }
             }
 
             TestType Read(BinaryReader& reader)

http://git-wip-us.apache.org/repos/asf/ignite/blob/ac660dca/modules/platforms/cpp/odbc-test/src/queries_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/queries_test.cpp b/modules/platforms/cpp/odbc-test/src/queries_test.cpp
index 82e9972..a7fc7a9 100644
--- a/modules/platforms/cpp/odbc-test/src/queries_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/queries_test.cpp
@@ -250,14 +250,14 @@ struct QueriesTestSuiteFixture
         BOOST_CHECK_EQUAL(columns[9], 0);
         BOOST_CHECK_EQUAL(columns[10], 0);
 
-        BOOST_CHECK_EQUAL(columnLens[0], 0);
-        BOOST_CHECK_EQUAL(columnLens[1], 0);
-        BOOST_CHECK_EQUAL(columnLens[2], 0);
-        BOOST_CHECK_EQUAL(columnLens[3], 0);
-        BOOST_CHECK_EQUAL(columnLens[4], 0);
-        BOOST_CHECK_EQUAL(columnLens[5], 0);
-        BOOST_CHECK_EQUAL(columnLens[6], 0);
-        BOOST_CHECK_EQUAL(columnLens[7], 0);
+        BOOST_CHECK_EQUAL(columnLens[0], static_cast<SQLLEN>(sizeof(T)));
+        BOOST_CHECK_EQUAL(columnLens[1], static_cast<SQLLEN>(sizeof(T)));
+        BOOST_CHECK_EQUAL(columnLens[2], static_cast<SQLLEN>(sizeof(T)));
+        BOOST_CHECK_EQUAL(columnLens[3], static_cast<SQLLEN>(sizeof(T)));
+        BOOST_CHECK_EQUAL(columnLens[4], static_cast<SQLLEN>(sizeof(T)));
+        BOOST_CHECK_EQUAL(columnLens[5], static_cast<SQLLEN>(sizeof(T)));
+        BOOST_CHECK_EQUAL(columnLens[6], static_cast<SQLLEN>(sizeof(T)));
+        BOOST_CHECK_EQUAL(columnLens[7], static_cast<SQLLEN>(sizeof(T)));
         BOOST_CHECK_EQUAL(columnLens[8], SQL_NO_TOTAL);
         BOOST_CHECK_EQUAL(columnLens[9], SQL_NO_TOTAL);
         BOOST_CHECK_EQUAL(columnLens[10], SQL_NO_TOTAL);
@@ -296,32 +296,32 @@ BOOST_AUTO_TEST_CASE(TestConnectionProtocolVersion_1_6_0)
 
 BOOST_AUTO_TEST_CASE(TestTwoRowsInt8)
 {
-    CheckTwoRowsInt<int8_t>(SQL_C_STINYINT);
+    CheckTwoRowsInt<signed char>(SQL_C_STINYINT);
 }
 
 BOOST_AUTO_TEST_CASE(TestTwoRowsUint8)
 {
-    CheckTwoRowsInt<uint8_t>(SQL_C_UTINYINT);
+    CheckTwoRowsInt<unsigned char>(SQL_C_UTINYINT);
 }
 
 BOOST_AUTO_TEST_CASE(TestTwoRowsInt16)
 {
-    CheckTwoRowsInt<int16_t>(SQL_C_SSHORT);
+    CheckTwoRowsInt<signed short>(SQL_C_SSHORT);
 }
 
 BOOST_AUTO_TEST_CASE(TestTwoRowsUint16)
 {
-    CheckTwoRowsInt<uint16_t>(SQL_C_USHORT);
+    CheckTwoRowsInt<unsigned short>(SQL_C_USHORT);
 }
 
 BOOST_AUTO_TEST_CASE(TestTwoRowsInt32)
 {
-    CheckTwoRowsInt<int32_t>(SQL_C_SLONG);
+    CheckTwoRowsInt<signed long>(SQL_C_SLONG);
 }
 
 BOOST_AUTO_TEST_CASE(TestTwoRowsUint32)
 {
-    CheckTwoRowsInt<uint32_t>(SQL_C_ULONG);
+    CheckTwoRowsInt<unsigned long>(SQL_C_ULONG);
 }
 
 BOOST_AUTO_TEST_CASE(TestTwoRowsInt64)
@@ -674,4 +674,115 @@ BOOST_AUTO_TEST_CASE(TestDataAtExecution)
     BOOST_CHECK(ret == SQL_NO_DATA);
 }
 
+BOOST_AUTO_TEST_CASE(TestNullFields)
+{
+    Connect("DRIVER={Apache Ignite};ADDRESS=127.0.0.1:11110;CACHE=cache");
+
+    SQLRETURN ret;
+
+    TestType in(1, 2, 3, 4, "5", 6.0f, 7.0, true, Guid(8, 9), BinaryUtils::MakeDateGmt(1987, 6, 5),
+        BinaryUtils::MakeTimestampGmt(1998, 12, 27, 1, 2, 3, 456));
+
+    TestType inNull;
+
+    inNull.allNulls = true;
+
+    testCache.Put(1, in);
+    testCache.Put(2, inNull);
+    testCache.Put(3, in);
+
+    const size_t columnsCnt = 10;
+
+    SQLLEN columnLens[columnsCnt] = { 0 };
+
+    int8_t i8Column;
+    int16_t i16Column;
+    int32_t i32Column;
+    int64_t i64Column;
+    char strColumn[ODBC_BUFFER_SIZE];
+    float floatColumn;
+    double doubleColumn;
+    bool boolColumn;
+    SQL_DATE_STRUCT dateColumn;
+    SQL_TIMESTAMP_STRUCT timestampColumn;
+
+    // Binding columns.
+    ret = SQLBindCol(stmt, 1, SQL_C_STINYINT, &i8Column, 0, &columnLens[0]);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLBindCol(stmt, 2, SQL_C_SSHORT, &i16Column, 0, &columnLens[1]);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLBindCol(stmt, 3, SQL_C_SLONG, &i32Column, 0, &columnLens[2]);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLBindCol(stmt, 4, SQL_C_SBIGINT, &i64Column, 0, &columnLens[3]);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLBindCol(stmt, 5, SQL_C_CHAR, &strColumn, ODBC_BUFFER_SIZE, &columnLens[4]);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLBindCol(stmt, 6, SQL_C_FLOAT, &floatColumn, 0, &columnLens[5]);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLBindCol(stmt, 7, SQL_C_DOUBLE, &doubleColumn, 0, &columnLens[6]);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLBindCol(stmt, 8, SQL_C_BIT, &boolColumn, 0, &columnLens[7]);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLBindCol(stmt, 9, SQL_C_DATE, &dateColumn, 0, &columnLens[8]);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    ret = SQLBindCol(stmt, 10, SQL_C_TIMESTAMP, &timestampColumn, 0, &columnLens[9]);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    SQLCHAR request[] = "SELECT i8Field, i16Field, i32Field, i64Field, strField, "
+        "floatField, doubleField, boolField, dateField, timestampField FROM TestType ORDER BY _key";
+
+    ret = SQLExecDirect(stmt, request, SQL_NTS);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    // Fetching the first non-null row.
+    ret = SQLFetch(stmt);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    // Checking that columns are not null.
+    for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
+        BOOST_CHECK_NE(columnLens[i], SQL_NULL_DATA);
+
+    // Fetching null row.
+    ret = SQLFetch(stmt);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    // Checking that columns are null.
+    for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
+        BOOST_CHECK_EQUAL(columnLens[i], SQL_NULL_DATA);
+
+    // Fetching the last non-null row.
+    ret = SQLFetch(stmt);
+    if (!SQL_SUCCEEDED(ret))
+        BOOST_FAIL(GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt));
+
+    // Checking that columns are not null.
+    for (SQLSMALLINT i = 0; i < columnsCnt; ++i)
+        BOOST_CHECK_NE(columnLens[i], SQL_NULL_DATA);
+
+    ret = SQLFetch(stmt);
+    BOOST_CHECK(ret == SQL_NO_DATA);
+}
+
 BOOST_AUTO_TEST_SUITE_END()

http://git-wip-us.apache.org/repos/asf/ignite/blob/ac660dca/modules/platforms/cpp/odbc-test/src/sql_outer_join_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_outer_join_test.cpp b/modules/platforms/cpp/odbc-test/src/sql_outer_join_test.cpp
index 426041b..56f5219 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_outer_join_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_outer_join_test.cpp
@@ -211,7 +211,7 @@ BOOST_AUTO_TEST_CASE(TestOuterJoinOpsLess)
     BOOST_CHECK_NE(columnsLen[0], SQL_NULL_DATA);
     BOOST_CHECK_EQUAL(columns[0], 30);
 
-    BOOST_CHECK_EQUAL(columnsLen[1], SQL_NULL_DATA);
+    BOOST_CHECK_NE(columnsLen[1], SQL_NULL_DATA);
 
     ret = SQLFetch(stmt);
     BOOST_CHECK(ret == SQL_NO_DATA);

http://git-wip-us.apache.org/repos/asf/ignite/blob/ac660dca/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp b/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
index 1438b0c..078e691 100644
--- a/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
+++ b/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
@@ -182,6 +182,10 @@ namespace ignite
 
                             memcpy(out->val, &uval, std::min<int>(SQL_MAX_NUMERIC_LEN, sizeof(uval)));
                         }
+
+                        if (resLenPtr)
+                            *resLenPtr = static_cast<SqlLen>(sizeof(SQL_NUMERIC_STRUCT));
+
                         break;
                     }
 
@@ -237,12 +241,16 @@ namespace ignite
             void ApplicationDataBuffer::PutNumToNumBuffer(Tin value)
             {
                 void* dataPtr = GetData();
+                SqlLen* resLenPtr = GetResLen();
 
                 if (dataPtr)
                 {
                     Tbuf* out = reinterpret_cast<Tbuf*>(dataPtr);
                     *out = static_cast<Tbuf>(value);
                 }
+
+                if (resLenPtr)
+                    *resLenPtr = static_cast<SqlLen>(sizeof(Tbuf));
             }
 
             template<typename CharT, typename Tin>
@@ -448,6 +456,8 @@ namespace ignite
             {
                 using namespace type_traits;
 
+                SqlLen* resLenPtr = GetResLen();
+
                 switch (type)
                 {
                     case IGNITE_ODBC_C_TYPE_CHAR:
@@ -476,13 +486,14 @@ namespace ignite
                         for (size_t i = 0; i < sizeof(guid->Data4); ++i)
                             guid->Data4[i] = (lsb >> (sizeof(guid->Data4) - i - 1) * 8) & 0xFF;
 
+                        if (resLenPtr)
+                            *resLenPtr = static_cast<SqlLen>(sizeof(SQLGUID));
+
                         break;
                     }
 
                     default:
                     {
-                        SqlLen* resLenPtr = GetResLen();
-
                         if (resLenPtr)
                             *resLenPtr = SQL_NO_TOTAL;
                     }
@@ -573,6 +584,8 @@ namespace ignite
             {
                 using namespace type_traits;
 
+                SqlLen* resLenPtr = GetResLen();
+
                 switch (type)
                 {
                     case IGNITE_ODBC_C_TYPE_SIGNED_TINYINT:
@@ -637,6 +650,9 @@ namespace ignite
                         numeric->sign = unscaled.GetSign() < 0 ? 0 : 1;
                         numeric->precision = unscaled.GetPrecision();
 
+                        if (resLenPtr)
+                            *resLenPtr = static_cast<SqlLen>(sizeof(SQL_NUMERIC_STRUCT));
+
                         break;
                     }
 
@@ -644,8 +660,6 @@ namespace ignite
                     case IGNITE_ODBC_C_TYPE_BINARY:
                     default:
                     {
-                        SqlLen* resLenPtr = GetResLen();
-
                         if (resLenPtr)
                             *resLenPtr = SQL_NO_TOTAL;
                     }
@@ -716,6 +730,9 @@ namespace ignite
                         buffer->month = tmTime.tm_mon + 1;
                         buffer->day = tmTime.tm_mday;
 
+                        if (resLenPtr)
+                            *resLenPtr = static_cast<SqlLen>(sizeof(SQL_DATE_STRUCT));
+
                         break;
                     }
 
@@ -731,6 +748,9 @@ namespace ignite
                         buffer->second = tmTime.tm_sec;
                         buffer->fraction = 0;
 
+                        if (resLenPtr)
+                            *resLenPtr = static_cast<SqlLen>(sizeof(SQL_TIMESTAMP_STRUCT));
+
                         break;
                     }
 
@@ -830,6 +850,9 @@ namespace ignite
                         buffer->month = tmTime.tm_mon + 1;
                         buffer->day = tmTime.tm_mday;
 
+                        if (resLenPtr)
+                            *resLenPtr = static_cast<SqlLen>(sizeof(SQL_DATE_STRUCT));
+
                         break;
                     }
 
@@ -845,6 +868,9 @@ namespace ignite
                         buffer->second = tmTime.tm_sec;
                         buffer->fraction = value.GetSecondFraction();
 
+                        if (resLenPtr)
+                            *resLenPtr = static_cast<SqlLen>(sizeof(SQL_TIMESTAMP_STRUCT));
+
                         break;
                     }
 


[3/3] ignite git commit: Merge remote-tracking branch 'remotes/community/ignite-1.6.11' into ignite-4154

Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/community/ignite-1.6.11' into ignite-4154


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4608a30b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4608a30b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4608a30b

Branch: refs/heads/ignite-4154
Commit: 4608a30b68d1db154c71f41045719fa9a9e9df44
Parents: d5465c7 cdae2ab
Author: sboikov <sb...@gridgain.com>
Authored: Thu Nov 10 19:00:15 2016 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Thu Nov 10 19:00:15 2016 +0300

----------------------------------------------------------------------
 modules/platforms/cpp/DEVNOTES.txt              |  12 ++
 .../platforms/cpp/odbc-test/include/test_type.h |  42 ++++--
 .../cpp/odbc-test/src/queries_test.cpp          | 139 +++++++++++++++++--
 .../cpp/odbc-test/src/sql_outer_join_test.cpp   |   2 +-
 modules/platforms/cpp/odbc/README.txt           |  23 +--
 .../cpp/odbc/install/ignite-odbc-amd64.wxs      | 114 +++++++++++++++
 .../cpp/odbc/install/ignite-odbc-x86.wxs        | 114 +++++++++++++++
 .../odbc/src/app/application_data_buffer.cpp    |  34 ++++-
 pom.xml                                         |   8 ++
 9 files changed, 450 insertions(+), 38 deletions(-)
----------------------------------------------------------------------



[2/3] ignite git commit: IGNITE-3873: Added WiX script to generate ODBC installer.

Posted by sb...@apache.org.
IGNITE-3873: Added WiX script to generate ODBC installer.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/cdae2ab7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/cdae2ab7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/cdae2ab7

Branch: refs/heads/ignite-4154
Commit: cdae2ab76d403aef9a0bd209fc7497dc6cfdfc08
Parents: ac660dc
Author: Igor Sapego <is...@gridgain.com>
Authored: Wed Nov 9 16:25:30 2016 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Wed Nov 9 16:25:30 2016 +0300

----------------------------------------------------------------------
 modules/platforms/cpp/DEVNOTES.txt              |  12 ++
 modules/platforms/cpp/odbc/README.txt           |  23 ++--
 .../cpp/odbc/install/ignite-odbc-amd64.wxs      | 114 +++++++++++++++++++
 .../cpp/odbc/install/ignite-odbc-x86.wxs        | 114 +++++++++++++++++++
 pom.xml                                         |   8 ++
 5 files changed, 263 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/cdae2ab7/modules/platforms/cpp/DEVNOTES.txt
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/DEVNOTES.txt b/modules/platforms/cpp/DEVNOTES.txt
index cd0a154..924b0d8 100644
--- a/modules/platforms/cpp/DEVNOTES.txt
+++ b/modules/platforms/cpp/DEVNOTES.txt
@@ -58,6 +58,18 @@ Building binaries:
  * If you want to build ODBC driver then you should explicitly build it as it is disabled
    in the solution file by default. In IDE it can be done by clicking on the ODBC project
    with the right mouse button and choosing "Build" option.
+   
+Building installers:
+ * Install WiX Toolset if you do not have it yet.
+ * Add WiX Toolset "bin" directory to your PATH environmental variable.
+ * Build ODBC drivers: Release|x64 for 64-bit version and Release|Win32 for 32-bit version.
+ * Open terminal and navigate to the directory $IGNITE_HOME/platforms/cpp/odbc/install
+ * Execute the following commands one by one to build 32-bit driver:
+    * candle.exe ignite-odbc-x86.wxs
+    * light.exe -ext WixUIExtension ignite-odbc-x86.wixobj
+ * Execute the following commands one by one to build 64-bit driver:
+    * candle.exe ignite-odbc-amd64.wxs
+    * light.exe -ext WixUIExtension ignite-odbc-amd64.wixobj
 
 Building in later versions of Visual Studio:
  * Open project\vs\ignite.sln or project\vs\ignite_86.sln in Visual Studio

http://git-wip-us.apache.org/repos/asf/ignite/blob/cdae2ab7/modules/platforms/cpp/odbc/README.txt
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/README.txt b/modules/platforms/cpp/odbc/README.txt
index 8f0c805..fe40a5c 100644
--- a/modules/platforms/cpp/odbc/README.txt
+++ b/modules/platforms/cpp/odbc/README.txt
@@ -58,14 +58,21 @@ ODBC driver you should perfrom the following steps:
 Installing ODBC driver on Windows
 =======================================
 
-For 32-bit Windows you should use 32-bit version of the driver while for the
-64-bit Windows you can use 64-bit driver as well as 32-bit.
-
-To install driver on Windows you should first choose a directory on your
-filesystem where your driver or drivers will be located. Once you have
-choosen the place you should put your driver there and ensure that all driver
-dependencies can be resolved i.e. they can be found either in the %PATH% or
-in the same directory as the driver.
+Note, that for 32-bit Windows you should use 32-bit version of the driver
+while for the 64-bit Windows you can use both 64-bit and 32-bit versions of the
+driver. You may want to use 32-bit driver on 64-bit system for 32-bit
+applications.
+
+There are two ways to install ODBC driver currently. The first one is to use
+32-bit or 64-bit installer. This is the most simple way and you are recommended
+to stick to it by default.
+
+However there is also another way to install driver manually using scripts. If
+you choose this method you should first choose a directory on your filesystem
+where your driver or drivers will be located. Once you have choosen the place
+you should put your driver there and ensure that all driver dependencies can be
+resolved i.e. they can be found either in the %PATH% or in the same directory
+as the driver.
 
 After that you should use one of the install scripts from the directory 
 %IGNITE_HOME%/platforms/cpp/odbc/install. Note that most likely you will

http://git-wip-us.apache.org/repos/asf/ignite/blob/cdae2ab7/modules/platforms/cpp/odbc/install/ignite-odbc-amd64.wxs
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/install/ignite-odbc-amd64.wxs b/modules/platforms/cpp/odbc/install/ignite-odbc-amd64.wxs
new file mode 100644
index 0000000..cb6ab54
--- /dev/null
+++ b/modules/platforms/cpp/odbc/install/ignite-odbc-amd64.wxs
@@ -0,0 +1,114 @@
+<?xml version='1.0' encoding='windows-1252'?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
+	<Product Name='Apache Ignite ODBC 64-bit Driver' Manufacturer='The Apache Software Foundation'
+		Id='F3E308E4-910C-4AF5-82DE-2ACF4D64830E' 
+		UpgradeCode='1D7AEFDF-6CD2-4FB5-88F2-811A89832D6D'
+		Language='1033' Codepage='1252' Version='1.6.7.0'>
+		
+		<Package Id='*' Keywords='Installer' Description="Apache Ignite ODBC 64-bit Driver Installer"
+			Comments='Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are trademarks of The Apache Software Foundation.'
+			Platform="x64" InstallerVersion='200' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
+
+		<Media Id='1' Cabinet='package.cab' EmbedCab='yes' DiskPrompt='CD-ROM #1' />
+		<Property Id='DiskPrompt' Value="Apache Ignite ODBC 64-bit Driver Installation [1]" />
+		
+		<Directory Id='TARGETDIR' Name='SourceDir'>
+			<Directory Id='ProgramFiles64Folder' Name='ProgramFiles'>
+				<Directory Id='ApacheIgnite' Name='Apache Ignite'>
+					<Directory Id='INSTALLDIR' Name='ODBC Driver'>
+						<Component Id='Driver' Guid='E5F0DDF2-DD3C-4196-8A08-70921858A52F' Win64='yes'>
+							<File Id='IgniteOdbcDll' Name='ignite.odbc.dll' DiskId='1' Source='../../project/vs/x64/Release/ignite.odbc.dll' KeyPath='yes'/>
+							
+							<RegistryValue Root='HKLM' Key='Software\ODBC\ODBCINST.INI\ODBC Drivers' Name='Apache Ignite' Type='string' Value='Installed'/>
+							
+							<RegistryKey Id='OdbcDriverRegInfo' Root='HKLM' Key='Software\ODBC\ODBCINST.INI\Apache Ignite' ForceCreateOnInstall='yes' ForceDeleteOnUninstall='yes'>
+								<RegistryValue Type='string' Name='DriverODBCVer' Value='03.00'/>
+								<RegistryValue Type='string' Name='Driver' Value='[#IgniteOdbcDll]'/>
+								<RegistryValue Type='string' Name='Setup' Value='[#IgniteOdbcDll]'/>
+								<RegistryValue Type='integer' Name='UsageCount' Value='1'/>
+							</RegistryKey>
+							
+						</Component>
+					</Directory>
+				</Directory>
+			</Directory>
+		</Directory>
+		
+		<Feature Id='Complete' Title='ODBC Driver' Description='Apache Ignite ODBC Driver.' Level='1'
+			ConfigurableDirectory='INSTALLDIR' Absent='disallow' AllowAdvertise='no' InstallDefault='local'>
+			<ComponentRef Id='Driver' />
+		</Feature>
+		
+		<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
+		
+		<UI Id="WixUI_InstallDir">
+            <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
+            <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
+            <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
+
+            <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
+            <Property Id="WixUI_Mode" Value="InstallDir" />
+
+            <DialogRef Id="BrowseDlg" />
+            <DialogRef Id="DiskCostDlg" />
+            <DialogRef Id="ErrorDlg" />
+            <DialogRef Id="FatalError" />
+            <DialogRef Id="FilesInUse" />
+            <DialogRef Id="MsiRMFilesInUse" />
+            <DialogRef Id="PrepareDlg" />
+            <DialogRef Id="ProgressDlg" />
+            <DialogRef Id="ResumeDlg" />
+            <DialogRef Id="UserExit" />
+            
+            <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
+            <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
+
+            <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
+
+            <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">NOT Installed</Publish>
+            <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
+
+            <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
+            <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
+            <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
+            <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
+            <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
+            <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
+            <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
+            
+            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1">NOT Installed</Publish>
+            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
+            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish>
+
+            <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
+
+            <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+            <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+            <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
+
+            <Property Id="ARPNOMODIFY" Value="1" />
+        </UI>
+
+        <UIRef Id="WixUI_Common" />
+		<UIRef Id="WixUI_ErrorProgressText" />
+		
+	</Product>
+</Wix>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/cdae2ab7/modules/platforms/cpp/odbc/install/ignite-odbc-x86.wxs
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/install/ignite-odbc-x86.wxs b/modules/platforms/cpp/odbc/install/ignite-odbc-x86.wxs
new file mode 100644
index 0000000..6ee1cdf
--- /dev/null
+++ b/modules/platforms/cpp/odbc/install/ignite-odbc-x86.wxs
@@ -0,0 +1,114 @@
+<?xml version='1.0' encoding='windows-1252'?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
+	<Product Name='Apache Ignite ODBC 32-bit Driver' Manufacturer='The Apache Software Foundation'
+		Id='D39CBABA-1E21-4701-AA5C-91EDA07B383B' 
+		UpgradeCode='743902A4-365C-424E-B226-5B2898A3941E'
+		Language='1033' Codepage='1252' Version='1.6.7.0'>
+		
+		<Package Id='*' Keywords='Installer' Description="Apache Ignite ODBC 32-bit Driver Installer"
+			Comments='Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are trademarks of The Apache Software Foundation.'
+			InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
+
+		<Media Id='1' Cabinet='package.cab' EmbedCab='yes' DiskPrompt='CD-ROM #1' />
+		<Property Id='DiskPrompt' Value="Apache Ignite ODBC 32-bit Driver Installation [1]" />
+		
+		<Directory Id='TARGETDIR' Name='SourceDir'>
+			<Directory Id='ProgramFilesFolder' Name='ProgramFiles'>
+				<Directory Id='ApacheIgnite' Name='Apache Ignite'>
+					<Directory Id='INSTALLDIR' Name='ODBC Driver'>
+						<Component Id='Driver' Guid='4AFA26EE-C639-4EF2-A9B2-281119BB4BB5'>
+							<File Id='IgniteOdbcDll' Name='ignite.odbc.dll' DiskId='1' Source='../../project/vs/Win32/Release/ignite.odbc.dll' KeyPath='yes'/>
+							
+							<RegistryValue Root='HKLM' Key='Software\ODBC\ODBCINST.INI\ODBC Drivers' Name='Apache Ignite' Type='string' Value='Installed'/>
+							
+							<RegistryKey Id='OdbcDriverRegInfo' Root='HKLM' Key='Software\ODBC\ODBCINST.INI\Apache Ignite' ForceCreateOnInstall='yes' ForceDeleteOnUninstall='yes'>
+								<RegistryValue Type='string' Name='DriverODBCVer' Value='03.00'/>
+								<RegistryValue Type='string' Name='Driver' Value='[#IgniteOdbcDll]'/>
+								<RegistryValue Type='string' Name='Setup' Value='[#IgniteOdbcDll]'/>
+								<RegistryValue Type='integer' Name='UsageCount' Value='1'/>
+							</RegistryKey>
+							
+						</Component>
+					</Directory>
+				</Directory>
+			</Directory>
+		</Directory>
+		
+		<Feature Id='Complete' Title='ODBC Driver' Description='Apache Ignite ODBC Driver.' Level='1'
+			ConfigurableDirectory='INSTALLDIR' Absent='disallow' AllowAdvertise='no' InstallDefault='local'>
+			<ComponentRef Id='Driver' />
+		</Feature>
+		
+		<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
+		
+		<UI Id="WixUI_InstallDir">
+            <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
+            <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
+            <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
+
+            <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
+            <Property Id="WixUI_Mode" Value="InstallDir" />
+
+            <DialogRef Id="BrowseDlg" />
+            <DialogRef Id="DiskCostDlg" />
+            <DialogRef Id="ErrorDlg" />
+            <DialogRef Id="FatalError" />
+            <DialogRef Id="FilesInUse" />
+            <DialogRef Id="MsiRMFilesInUse" />
+            <DialogRef Id="PrepareDlg" />
+            <DialogRef Id="ProgressDlg" />
+            <DialogRef Id="ResumeDlg" />
+            <DialogRef Id="UserExit" />
+            
+            <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
+            <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
+
+            <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
+
+            <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">NOT Installed</Publish>
+            <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish>
+
+            <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
+            <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
+            <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish>
+            <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
+            <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
+            <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
+            <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
+            
+            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1">NOT Installed</Publish>
+            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
+            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish>
+
+            <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
+
+            <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+            <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
+            <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
+
+            <Property Id="ARPNOMODIFY" Value="1" />
+        </UI>
+
+        <UIRef Id="WixUI_Common" />
+		<UIRef Id="WixUI_ErrorProgressText" />
+		
+	</Product>
+</Wix>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/cdae2ab7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 36051b4..8069e38 100644
--- a/pom.xml
+++ b/pom.xml
@@ -892,6 +892,14 @@
                                         </replaceregexp>
 
                                         <replaceregexp byline="true" encoding="UTF-8">
+                                            <regexp pattern="(Version=.+)\d+\.\d+\.\d+\.\d+(.+)" />
+                                            <substitution expression="\1${new.client.version}\2" />
+                                            <fileset dir="${basedir}/">
+                                                <include name="**/*.wxs" />
+                                            </fileset>
+                                        </replaceregexp>
+
+                                        <replaceregexp byline="true" encoding="UTF-8">
                                             <regexp pattern="(define GG_VERSION_STR_WIN &quot;)\d+\.\d+\.\d+(\.\d+)?(&quot;)" />
                                             <substitution expression="\1${new.client.version}\3" />
                                             <fileset dir="${basedir}/">