IGNITE-9248: Compilation fix for Clang.

This closes #4527


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

Branch: refs/heads/ignite-9340
Commit: 0020e417cfaf36da513c2063dc081514498a1597
Parents: 0681d87
Author: Igor Sapego <[email protected]>
Authored: Wed Aug 22 15:28:07 2018 +0300
Committer: Igor Sapego <[email protected]>
Committed: Wed Aug 22 15:28:07 2018 +0300

----------------------------------------------------------------------
 .../odbc/ClientListenerNioListener.java         |  4 +-
 .../ignite/impl/binary/binary_reader_impl.h     | 50 +++++++++++------
 .../ignite/impl/binary/binary_type_impl.h       |  8 +--
 .../ignite/impl/binary/binary_writer_impl.h     | 48 +++++++++++-----
 .../src/impl/binary/binary_reader_impl.cpp      | 46 ++++++++--------
 .../src/impl/binary/binary_writer_impl.cpp      | 58 ++++++++++----------
 .../src/impl/cluster/cluster_group_impl.cpp     |  2 +-
 .../odbc-test/include/sql_test_suite_fixture.h  | 14 ++---
 .../src/application_data_buffer_test.cpp        |  4 +-
 .../cpp/odbc-test/src/odbc_test_suite.cpp       |  2 +-
 .../cpp/odbc-test/src/queries_test.cpp          | 10 ++--
 .../platforms/cpp/odbc-test/src/row_test.cpp    |  2 +-
 .../src/sql_aggregate_functions_test.cpp        | 16 +++---
 .../src/sql_date_time_functions_test.cpp        | 38 ++++++-------
 .../src/sql_esc_convert_function_test.cpp       |  6 +-
 .../src/sql_numeric_functions_test.cpp          |  4 +-
 .../cpp/odbc-test/src/sql_operators_test.cpp    | 10 ++--
 .../odbc-test/src/sql_string_functions_test.cpp | 20 +++----
 .../odbc-test/src/sql_system_functions_test.cpp |  2 +-
 .../odbc-test/src/sql_test_suite_fixture.cpp    | 24 ++++----
 .../cpp/odbc-test/src/sql_types_test.cpp        |  6 +-
 .../src/sql_value_expressions_test.cpp          |  6 +-
 .../odbc/src/app/application_data_buffer.cpp    | 16 +++---
 .../include/ignite/impl/thin/readable.h         |  2 +-
 24 files changed, 216 insertions(+), 182 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerNioListener.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerNioListener.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerNioListener.java
index eea391c..c9670c6 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerNioListener.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerNioListener.java
@@ -128,8 +128,6 @@ public class ClientListenerNioListener extends 
GridNioServerListenerAdapter<byte
         if (connCtx == null) {
             onHandshake(ses, msg);
 
-            ses.addMeta(CONN_CTX_HANDSHAKE_PASSED, true);
-
             return;
         }
 
@@ -235,6 +233,8 @@ public class ClientListenerNioListener extends 
GridNioServerListenerAdapter<byte
                 throw new IgniteCheckedException("Unsupported version.");
 
             connCtx.handler().writeHandshake(writer);
+
+            ses.addMeta(CONN_CTX_HANDSHAKE_PASSED, true);
         }
         catch (IgniteAccessControlException authEx) {
             writer.writeBoolean(false);

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h
----------------------------------------------------------------------
diff --git 
a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h 
b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h
index 998c7c3..94f5ec5 100644
--- 
a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h
+++ 
b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_reader_impl.h
@@ -37,6 +37,11 @@
 
 namespace ignite
 {
+    namespace binary
+    {
+        class BinaryReader;
+    }
+
     namespace impl
     {
         namespace binary
@@ -899,7 +904,7 @@ namespace ignite
                  *
                  * @return Read object.
                  */
-                template<typename T>
+                template<typename R, typename T>
                 void ReadTopObject0(T& res)
                 {
                     int32_t pos = stream->Position();
@@ -928,7 +933,7 @@ namespace ignite
 
                             stream->Position(curPos + portOff); // Position 
stream right on the object.
 
-                            ReadTopObject0<T>(res);
+                            ReadTopObject0<R, T>(res);
 
                             stream->Position(curPos + portLen + 4); // 
Position stream after binary.
 
@@ -1003,7 +1008,7 @@ namespace ignite
                             BinaryReaderImpl readerImpl(stream, &idRslvr, pos, 
usrType,
                                                         typeId, hashCode, len, 
rawOff,
                                                         footerBegin, 
footerEnd, schemaType);
-                            ignite::binary::BinaryReader reader(&readerImpl);
+                            R reader(&readerImpl);
 
                             BType::Read(reader, res);
 
@@ -1426,43 +1431,56 @@ namespace ignite
             };
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<int8_t>(int8_t& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
int8_t>(int8_t& res);
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<bool>(bool& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
bool>(bool& res);
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<int16_t>(int16_t& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
int16_t>(int16_t& res);
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<uint16_t>(uint16_t& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
uint16_t>(uint16_t& res);
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<int32_t>(int32_t& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
int32_t>(int32_t& res);
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<int64_t>(int64_t& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
int64_t>(int64_t& res);
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<float>(float& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
float>(float& res);
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<double>(double& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
double>(double& res);
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<Guid>(Guid& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
Guid>(Guid& res);
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<Date>(Date& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
Date>(Date& res);
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<Timestamp>(Timestamp& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
Timestamp>(Timestamp& res);
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<Time>(Time& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
Time>(Time& res);
 
             template<>
-            void IGNITE_IMPORT_EXPORT 
BinaryReaderImpl::ReadTopObject0<std::string>(std::string& res);
+            void IGNITE_IMPORT_EXPORT
+            BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
std::string>(std::string& res);
 
             template<>
             inline int8_t BinaryReaderImpl::GetNull() const

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_impl.h
----------------------------------------------------------------------
diff --git 
a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_impl.h 
b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_impl.h
index 3183d4b..64638c2 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_impl.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_type_impl.h
@@ -66,7 +66,7 @@ namespace ignite
             template<typename W>
             static void Write(W& writer, const T& val)
             {
-                writer.WriteTopObject0(val);
+                writer.template WriteTopObject0<BinaryWriter>(val);
             }
         };
 
@@ -82,7 +82,7 @@ namespace ignite
                 if (!val)
                     writer.WriteNull0();
                 else
-                    writer.WriteTopObject0(*val);
+                    writer.template WriteTopObject0<BinaryWriter>(*val);
             }
         };
 
@@ -97,7 +97,7 @@ namespace ignite
             {
                 T res;
 
-                reader.template ReadTopObject0<T>(res);
+                reader.template ReadTopObject0<ignite::binary::BinaryReader, 
T>(res);
 
                 return res;
             }
@@ -117,7 +117,7 @@ namespace ignite
 
                 std::auto_ptr<T> res(new T());
 
-                reader.template ReadTopObject0<T>(*res);
+                reader.template ReadTopObject0<ignite::binary::BinaryReader, 
T>(*res);
 
                 return res.release();
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
----------------------------------------------------------------------
diff --git 
a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h 
b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
index 4364bf5..e6cd487 100644
--- 
a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
+++ 
b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
@@ -41,6 +41,11 @@
 
 namespace ignite
 {
+    namespace binary
+    {
+        class BinaryWriter;
+    }
+
     namespace impl
     {
         namespace binary
@@ -715,7 +720,7 @@ namespace ignite
                  *
                  * @param obj Object to write.
                  */
-                template<typename T>
+                template<typename W, typename T>
                 void WriteTopObject0(const T& obj)
                 {
                     typedef ignite::binary::BinaryType<T> BType;
@@ -736,7 +741,7 @@ namespace ignite
                         int32_t pos = stream->Position();
 
                         BinaryWriterImpl writerImpl(stream, &idRslvr, metaMgr, 
metaHnd.Get(), pos);
-                        ignite::binary::BinaryWriter writer(&writerImpl);
+                        W writer(&writerImpl);
 
                         stream->WriteInt8(IGNITE_HDR_FULL);
                         stream->WriteInt8(IGNITE_PROTO_VER);
@@ -1019,43 +1024,56 @@ namespace ignite
             };
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
int8_t& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
int8_t>(const int8_t& obj);
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
bool& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
bool>(const bool& obj);
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
int16_t& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
int16_t>(const int16_t& obj);
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
uint16_t& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
uint16_t>(const uint16_t& obj);
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
int32_t& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
int32_t>(const int32_t& obj);
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
int64_t& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
int64_t>(const int64_t& obj);
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
float& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
float>(const float& obj);
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
double& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
double>(const double& obj);
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
Guid& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
Guid>(const Guid& obj);
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
Date& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
Date>(const Date& obj);
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
Timestamp& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
Timestamp>(const Timestamp& obj);
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
Time& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
Time>(const Time& obj);
 
             template<>
-            void IGNITE_IMPORT_EXPORT BinaryWriterImpl::WriteTopObject0(const 
std::string& obj);
+            void IGNITE_IMPORT_EXPORT
+            BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
std::string>(const std::string& obj);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/binary/src/impl/binary/binary_reader_impl.cpp
----------------------------------------------------------------------
diff --git 
a/modules/platforms/cpp/binary/src/impl/binary/binary_reader_impl.cpp 
b/modules/platforms/cpp/binary/src/impl/binary/binary_reader_impl.cpp
index 5e37887..3941b60 100644
--- a/modules/platforms/cpp/binary/src/impl/binary/binary_reader_impl.cpp
+++ b/modules/platforms/cpp/binary/src/impl/binary/binary_reader_impl.cpp
@@ -762,62 +762,62 @@ namespace ignite
                 rawMode = true;
             }
 
-            template <>
-            void BinaryReaderImpl::ReadTopObject0<int8_t>(int8_t& res)
+            template<>
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, int8_t>(int8_t& 
res)
             {
                 res = ReadTopObject0<int8_t>(IGNITE_TYPE_BYTE, 
BinaryUtils::ReadInt8);
             }
 
-            template <>
-            void BinaryReaderImpl::ReadTopObject0<bool>(bool& res)
+            template<>
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, bool>(bool& res)
             {
                 res = ReadTopObject0<bool>(IGNITE_TYPE_BOOL, 
BinaryUtils::ReadBool);
             }
 
             template <>
-            void BinaryReaderImpl::ReadTopObject0<int16_t>(int16_t& res)
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
int16_t>(int16_t& res)
             {
                 res = ReadTopObject0<int16_t>(IGNITE_TYPE_SHORT, 
BinaryUtils::ReadInt16);
             }
 
-            template <>
-            void BinaryReaderImpl::ReadTopObject0<uint16_t>(uint16_t& res)
+            template<>
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
uint16_t>(uint16_t& res)
             {
                 res = ReadTopObject0<uint16_t>(IGNITE_TYPE_CHAR, 
BinaryUtils::ReadUInt16);
             }
 
-            template <>
-            void BinaryReaderImpl::ReadTopObject0<int32_t>(int32_t& res)
+            template<>
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
int32_t>(int32_t& res)
             {
                 res = ReadTopObject0<int32_t>(IGNITE_TYPE_INT, 
BinaryUtils::ReadInt32);
             }
 
-            template <>
-            void BinaryReaderImpl::ReadTopObject0<int64_t>(int64_t& res)
+            template<>
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
int64_t>(int64_t& res)
             {
                 res = ReadTopObject0<int64_t>(IGNITE_TYPE_LONG, 
BinaryUtils::ReadInt64);
             }
 
-            template <>
-            void BinaryReaderImpl::ReadTopObject0<float>(float& res)
+            template<>
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, float>(float& 
res)
             {
                 res = ReadTopObject0<float>(IGNITE_TYPE_FLOAT, 
BinaryUtils::ReadFloat);
             }
 
-            template <>
-            void BinaryReaderImpl::ReadTopObject0<double>(double& res)
+            template<>
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, double>(double& 
res)
             {
                 res = ReadTopObject0<double>(IGNITE_TYPE_DOUBLE, 
BinaryUtils::ReadDouble);
             }
 
-            template <>
-            void BinaryReaderImpl::ReadTopObject0<Guid>(Guid& res)
+            template<>
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, Guid>(Guid& res)
             {
                 res = ReadTopObject0<Guid>(IGNITE_TYPE_UUID, 
BinaryUtils::ReadGuid);
             }
 
-            template <>
-            void BinaryReaderImpl::ReadTopObject0<Date>(Date& res)
+            template<>
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, Date>(Date& res)
             {
                 int8_t typeId = stream->ReadInt8();
 
@@ -835,20 +835,20 @@ namespace ignite
                 }
             }
 
-            template <>
-            void BinaryReaderImpl::ReadTopObject0<Timestamp>(Timestamp& res)
+            template<>
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
Timestamp>(Timestamp& res)
             {
                 res = ReadTopObject0<Timestamp>(IGNITE_TYPE_TIMESTAMP, 
BinaryUtils::ReadTimestamp);
             }
 
             template<>
-            void BinaryReaderImpl::ReadTopObject0<Time>(Time& res)
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, Time>(Time& res)
             {
                 res = ReadTopObject0<Time>(IGNITE_TYPE_TIME, 
BinaryUtils::ReadTime);
             }
 
             template<>
-            void BinaryReaderImpl::ReadTopObject0<std::string>(std::string& 
res)
+            void 
BinaryReaderImpl::ReadTopObject0<ignite::binary::BinaryReader, 
std::string>(std::string& res)
             {
                 int8_t typeId = stream->ReadInt8();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp
----------------------------------------------------------------------
diff --git 
a/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp 
b/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp
index 2ac783a..51be3a0 100644
--- a/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp
+++ b/modules/platforms/cpp/binary/src/impl/binary/binary_writer_impl.cpp
@@ -260,7 +260,7 @@ namespace ignite
                     stream->WriteInt32(len);
 
                     for (int i = 0; i < len; i++)
-                        WriteTopObject0(val[i]);
+                        WriteTopObject0<ignite::binary::BinaryWriter>(val[i]);
                 }
                 else
                 {
@@ -323,7 +323,7 @@ namespace ignite
                     stream->WriteInt32(len);
 
                     for (int i = 0; i < len; i++)
-                        WriteTopObject0(val[i]);
+                        WriteTopObject0<ignite::binary::BinaryWriter>(val[i]);
                 }
                 else
                     stream->WriteInt8(IGNITE_HDR_NULL);
@@ -384,7 +384,7 @@ namespace ignite
                     stream->WriteInt32(len);
 
                     for (int i = 0; i < len; i++)
-                        WriteTopObject0(val[i]);
+                        WriteTopObject0<ignite::binary::BinaryWriter>(val[i]);
                 }
                 else
                     stream->WriteInt8(IGNITE_HDR_NULL);
@@ -445,7 +445,7 @@ namespace ignite
                     stream->WriteInt32(len);
 
                     for (int i = 0; i < len; i++)
-                        WriteTopObject0(val[i]);
+                        WriteTopObject0<ignite::binary::BinaryWriter>(val[i]);
                 }
                 else
                     stream->WriteInt8(IGNITE_HDR_NULL);
@@ -687,80 +687,80 @@ namespace ignite
                     metaHnd->OnFieldWritten(fieldId, fieldName, fieldTypeId);
             }
 
-            template <>
-            void BinaryWriterImpl::WriteTopObject0<int8_t>(const int8_t& obj)
+            template<>
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, int8_t>(const 
int8_t& obj)
             {
                 WriteTopObject0<int8_t>(obj, BinaryUtils::WriteInt8, 
IGNITE_TYPE_BYTE);
             }
 
-            template <>
-            void BinaryWriterImpl::WriteTopObject0<bool>(const bool& obj)
+            template<>
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, bool>(const 
bool& obj)
             {
                 WriteTopObject0<bool>(obj, BinaryUtils::WriteBool, 
IGNITE_TYPE_BOOL);
             }
 
-            template <>
-            void BinaryWriterImpl::WriteTopObject0<int16_t>(const int16_t& obj)
+            template<>
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, int16_t>(const 
int16_t& obj)
             {
                 WriteTopObject0<int16_t>(obj, BinaryUtils::WriteInt16, 
IGNITE_TYPE_SHORT);
             }
 
-            template <>
-            void BinaryWriterImpl::WriteTopObject0<uint16_t>(const uint16_t& 
obj)
+            template<>
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, uint16_t>(const 
uint16_t& obj)
             {
                 WriteTopObject0<uint16_t>(obj, BinaryUtils::WriteUInt16, 
IGNITE_TYPE_CHAR);
             }
 
-            template <>
-            void BinaryWriterImpl::WriteTopObject0<int32_t>(const int32_t& obj)
+            template<>
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, int32_t>(const 
int32_t& obj)
             {
                 WriteTopObject0<int32_t>(obj, BinaryUtils::WriteInt32, 
IGNITE_TYPE_INT);
             }
 
-            template <>
-            void BinaryWriterImpl::WriteTopObject0<int64_t>(const int64_t& obj)
+            template<>
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, int64_t>(const 
int64_t& obj)
             {
                 WriteTopObject0<int64_t>(obj, BinaryUtils::WriteInt64, 
IGNITE_TYPE_LONG);
             }
 
-            template <>
-            void BinaryWriterImpl::WriteTopObject0<float>(const float& obj)
+            template<>
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, float>(const 
float& obj)
             {
                 WriteTopObject0<float>(obj, BinaryUtils::WriteFloat, 
IGNITE_TYPE_FLOAT);
             }
 
-            template <>
-            void BinaryWriterImpl::WriteTopObject0<double>(const double& obj)
+            template<>
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, double>(const 
double& obj)
             {
                 WriteTopObject0<double>(obj, BinaryUtils::WriteDouble, 
IGNITE_TYPE_DOUBLE);
             }
 
-            template <>
-            void BinaryWriterImpl::WriteTopObject0<Guid>(const Guid& obj)
+            template<>
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, Guid>(const 
Guid& obj)
             {
                 WriteTopObject0<Guid>(obj, BinaryUtils::WriteGuid, 
IGNITE_TYPE_UUID);
             }
 
-            template <>
-            void BinaryWriterImpl::WriteTopObject0<Date>(const Date& obj)
+            template<>
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, Date>(const 
Date& obj)
             {
                 WriteTopObject0<Date>(obj, BinaryUtils::WriteDate, 
IGNITE_TYPE_DATE);
             }
 
-            template <>
-            void BinaryWriterImpl::WriteTopObject0<Timestamp>(const Timestamp& 
obj)
+            template<>
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
Timestamp>(const Timestamp& obj)
             {
                 WriteTopObject0<Timestamp>(obj, BinaryUtils::WriteTimestamp, 
IGNITE_TYPE_TIMESTAMP);
             }
 
-            template <>
-            void BinaryWriterImpl::WriteTopObject0<Time>(const Time& obj)
+            template<>
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, Time>(const 
Time& obj)
             {
                 WriteTopObject0<Time>(obj, BinaryUtils::WriteTime, 
IGNITE_TYPE_TIME);
             }
 
             template<>
-            void BinaryWriterImpl::WriteTopObject0(const std::string& obj)
+            void 
BinaryWriterImpl::WriteTopObject0<ignite::binary::BinaryWriter, 
std::string>(const std::string& obj)
             {
                 const char* obj0 = obj.c_str();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/core/src/impl/cluster/cluster_group_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/src/impl/cluster/cluster_group_impl.cpp 
b/modules/platforms/cpp/core/src/impl/cluster/cluster_group_impl.cpp
index 91f9d30..669a971 100644
--- a/modules/platforms/cpp/core/src/impl/cluster/cluster_group_impl.cpp
+++ b/modules/platforms/cpp/core/src/impl/cluster/cluster_group_impl.cpp
@@ -80,7 +80,7 @@ namespace ignite
             {
                 IgniteError err;
 
-                int64_t res = OutInOpLong(Command::SET_ACTIVE, active ? 1 : 0, 
err);
+                OutInOpLong(Command::SET_ACTIVE, active ? 1 : 0, err);
 
                 IgniteError::ThrowIfNeeded(err);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/include/sql_test_suite_fixture.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/include/sql_test_suite_fixture.h 
b/modules/platforms/cpp/odbc-test/include/sql_test_suite_fixture.h
index 8a76a67..b6af53d 100644
--- a/modules/platforms/cpp/odbc-test/include/sql_test_suite_fixture.h
+++ b/modules/platforms/cpp/odbc-test/include/sql_test_suite_fixture.h
@@ -109,7 +109,7 @@ namespace ignite
         }
 
         /**
-         * Run query returning single result and check it to be equal to 
expected.
+         * Run query returning single result.
          *
          * @param request SQL request.
          * @param type Result type.
@@ -143,13 +143,13 @@ namespace ignite
     void SqlTestSuiteFixture::CheckSingleResult<std::string>(const char* 
request, const std::string& expected);
 
     template<>
-    void SqlTestSuiteFixture::CheckSingleResult<int64_t>(const char* request, 
const int64_t& expected);
+    void SqlTestSuiteFixture::CheckSingleResult<SQLBIGINT>(const char* 
request, const SQLBIGINT& expected);
 
     template<>
-    void SqlTestSuiteFixture::CheckSingleResult<int32_t>(const char* request, 
const int32_t& expected);
+    void SqlTestSuiteFixture::CheckSingleResult<SQLINTEGER>(const char* 
request, const SQLINTEGER& expected);
 
     template<>
-    void SqlTestSuiteFixture::CheckSingleResult<int16_t>(const char* request, 
const int16_t& expected);
+    void SqlTestSuiteFixture::CheckSingleResult<SQLSMALLINT>(const char* 
request, const SQLSMALLINT& expected);
 
     template<>
     void SqlTestSuiteFixture::CheckSingleResult<int8_t>(const char* request, 
const int8_t& expected);
@@ -170,13 +170,13 @@ namespace ignite
     void SqlTestSuiteFixture::CheckSingleResult<std::string>(const char* 
request);
 
     template<>
-    void SqlTestSuiteFixture::CheckSingleResult<int64_t>(const char* request);
+    void SqlTestSuiteFixture::CheckSingleResult<SQLBIGINT>(const char* 
request);
 
     template<>
-    void SqlTestSuiteFixture::CheckSingleResult<int32_t>(const char* request);
+    void SqlTestSuiteFixture::CheckSingleResult<SQLINTEGER>(const char* 
request);
 
     template<>
-    void SqlTestSuiteFixture::CheckSingleResult<int16_t>(const char* request);
+    void SqlTestSuiteFixture::CheckSingleResult<SQLSMALLINT>(const char* 
request);
 
     template<>
     void SqlTestSuiteFixture::CheckSingleResult<int8_t>(const char* request);

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
----------------------------------------------------------------------
diff --git 
a/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp 
b/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
index 8696c4c..7329bcb 100644
--- a/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/application_data_buffer_test.cpp
@@ -158,7 +158,7 @@ BOOST_AUTO_TEST_CASE(TestPutStringToWstring)
 
 BOOST_AUTO_TEST_CASE(TestPutStringToLong)
 {
-    long numBuf;
+    SQLINTEGER numBuf;
     SqlLen reslen = 0;
 
     ApplicationDataBuffer appBuf(OdbcNativeType::AI_SIGNED_LONG, &numBuf, 
sizeof(numBuf), &reslen);
@@ -275,7 +275,7 @@ BOOST_AUTO_TEST_CASE(TestPutDecimalToDouble)
 
 BOOST_AUTO_TEST_CASE(TestPutDecimalToLong)
 {
-    long numBuf;
+    SQLINTEGER numBuf;
     SqlLen reslen = 0;
 
     ApplicationDataBuffer appBuf(OdbcNativeType::AI_SIGNED_LONG, &numBuf, 
sizeof(numBuf), &reslen);

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/odbc_test_suite.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/odbc_test_suite.cpp 
b/modules/platforms/cpp/odbc-test/src/odbc_test_suite.cpp
index 5ab1359..641dcdc 100644
--- a/modules/platforms/cpp/odbc-test/src/odbc_test_suite.cpp
+++ b/modules/platforms/cpp/odbc-test/src/odbc_test_suite.cpp
@@ -339,7 +339,7 @@ namespace ignite
                 timestampFields[i].hour = timeFields[i].hour;
                 timestampFields[i].minute = timeFields[i].minute;
                 timestampFields[i].second = timeFields[i].second;
-                timestampFields[i].fraction = std::abs(seed * 914873) % 
1000000000;
+                timestampFields[i].fraction = 
static_cast<uint64_t>(std::abs(seed * 914873)) % 1000000000;
 
                 for (int j = 0; j < 42; ++j)
                     i8ArrayFields[i * 42 + j] = seed * 42 + j;

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/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 73727dd..57b7c10 100644
--- a/modules/platforms/cpp/odbc-test/src/queries_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/queries_test.cpp
@@ -30,7 +30,6 @@
 #   define BOOST_TEST_DYN_LINK
 #endif
 
-#include <boost/regex.hpp>
 #include <boost/test/unit_test.hpp>
 
 #include "ignite/ignite.h"
@@ -262,12 +261,12 @@ BOOST_AUTO_TEST_CASE(TestTwoRowsUint16)
 
 BOOST_AUTO_TEST_CASE(TestTwoRowsInt32)
 {
-    CheckTwoRowsInt<signed long>(SQL_C_SLONG);
+    CheckTwoRowsInt<SQLINTEGER>(SQL_C_SLONG);
 }
 
 BOOST_AUTO_TEST_CASE(TestTwoRowsUint32)
 {
-    CheckTwoRowsInt<unsigned long>(SQL_C_ULONG);
+    CheckTwoRowsInt<SQLUINTEGER>(SQL_C_ULONG);
 }
 
 BOOST_AUTO_TEST_CASE(TestTwoRowsInt64)
@@ -1625,10 +1624,9 @@ BOOST_AUTO_TEST_CASE(TestErrorMessage)
     BOOST_REQUIRE_EQUAL(ret, SQL_ERROR);
 
     std::string error = GetOdbcErrorMessage(SQL_HANDLE_STMT, stmt);
-    std::string pattern = "42000: Table \"B\" not found; SQL 
statement:\\vSELECT a FROM B.*";
+    std::string pattern = "42000: Table \"B\" not found; SQL 
statement:\nSELECT a FROM B";
 
-    boost::cmatch what;
-    if (!boost::regex_match(error.c_str(), what, boost::regex(pattern)))
+    if (error.substr(0, pattern.size()) != pattern)
         BOOST_FAIL("'" + error + "' does not match '" + pattern + "'");
 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/row_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/row_test.cpp 
b/modules/platforms/cpp/odbc-test/src/row_test.cpp
index 1aced92..2fdd784 100644
--- a/modules/platforms/cpp/odbc-test/src/row_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/row_test.cpp
@@ -79,7 +79,7 @@ void CheckRowData(Row& row, size_t rowIdx)
 {
     SqlLen reslen;
 
-    long longBuf;
+    SQLINTEGER longBuf;
     char strBuf[1024];
     SQLGUID guidBuf;
     char bitBuf;

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/sql_aggregate_functions_test.cpp
----------------------------------------------------------------------
diff --git 
a/modules/platforms/cpp/odbc-test/src/sql_aggregate_functions_test.cpp 
b/modules/platforms/cpp/odbc-test/src/sql_aggregate_functions_test.cpp
index fd55d99..c5bc932 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_aggregate_functions_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_aggregate_functions_test.cpp
@@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE(TestAggregateFunctionAvgInt)
 
     avg /= static_cast<int32_t>(in.size());
 
-    CheckSingleResult<int64_t>("SELECT {fn AVG(i32Field)} FROM TestType", avg);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn AVG(i32Field)} FROM TestType", 
avg);
 }
 
 BOOST_AUTO_TEST_CASE(TestAggregateFunctionAvgIntDistinct)
@@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE(TestAggregateFunctionAvgIntDistinct)
 
     testCache.Put(in.size() + 10, in[0]);
 
-    CheckSingleResult<int64_t>("SELECT {fn AVG(DISTINCT i32Field)} FROM 
TestType", avg);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn AVG(DISTINCT i32Field)} FROM 
TestType", avg);
 }
 
 BOOST_AUTO_TEST_CASE(TestAggregateFunctionAvgFloat)
@@ -154,7 +154,7 @@ BOOST_AUTO_TEST_CASE(TestAggregateFunctionCount)
     for (int32_t i = 0; i < static_cast<int32_t>(in.size()); ++i)
         testCache.Put(i, in[i]);
 
-    CheckSingleResult<int64_t>("SELECT {fn COUNT(*)} FROM TestType", 
in.size());
+    CheckSingleResult<SQLBIGINT>("SELECT {fn COUNT(*)} FROM TestType", 
in.size());
 }
 
 BOOST_AUTO_TEST_CASE(TestAggregateFunctionCountDistinct)
@@ -170,7 +170,7 @@ BOOST_AUTO_TEST_CASE(TestAggregateFunctionCountDistinct)
 
     testCache.Put(in.size() + 10, in[0]);
 
-    CheckSingleResult<int64_t>("SELECT {fn COUNT(DISTINCT i32Field)} FROM 
TestType", in.size());
+    CheckSingleResult<SQLBIGINT>("SELECT {fn COUNT(DISTINCT i32Field)} FROM 
TestType", in.size());
 }
 
 BOOST_AUTO_TEST_CASE(TestAggregateFunctionMax)
@@ -185,7 +185,7 @@ BOOST_AUTO_TEST_CASE(TestAggregateFunctionMax)
     for (int32_t i = 0; i < static_cast<int32_t>(in.size()); ++i)
         testCache.Put(i, in[i]);
 
-    CheckSingleResult<int64_t>("SELECT {fn MAX(i32Field)} FROM TestType", 
in[2].i32Field);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn MAX(i32Field)} FROM TestType", 
in[2].i32Field);
 }
 
 BOOST_AUTO_TEST_CASE(TestAggregateFunctionMin)
@@ -200,7 +200,7 @@ BOOST_AUTO_TEST_CASE(TestAggregateFunctionMin)
     for (int32_t i = 0; i < static_cast<int32_t>(in.size()); ++i)
         testCache.Put(i, in[i]);
 
-    CheckSingleResult<int64_t>("SELECT {fn MIN(i32Field)} FROM TestType", 
in[1].i32Field);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn MIN(i32Field)} FROM TestType", 
in[1].i32Field);
 }
 
 BOOST_AUTO_TEST_CASE(TestAggregateFunctionSum)
@@ -221,7 +221,7 @@ BOOST_AUTO_TEST_CASE(TestAggregateFunctionSum)
         sum += in[i].i32Field;
     }
 
-    CheckSingleResult<int64_t>("SELECT {fn SUM(i32Field)} FROM TestType", sum);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn SUM(i32Field)} FROM TestType", 
sum);
 }
 
 BOOST_AUTO_TEST_CASE(TestAggregateFunctionSumDistinct)
@@ -244,7 +244,7 @@ BOOST_AUTO_TEST_CASE(TestAggregateFunctionSumDistinct)
 
     testCache.Put(in.size() + 10, in[0]);
 
-    CheckSingleResult<int64_t>("SELECT {fn SUM(DISTINCT i32Field)} FROM 
TestType", sum);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn SUM(DISTINCT i32Field)} FROM 
TestType", sum);
 }
 
 BOOST_AUTO_TEST_SUITE_END()

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/sql_date_time_functions_test.cpp
----------------------------------------------------------------------
diff --git 
a/modules/platforms/cpp/odbc-test/src/sql_date_time_functions_test.cpp 
b/modules/platforms/cpp/odbc-test/src/sql_date_time_functions_test.cpp
index c822fec..d56b897 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_date_time_functions_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_date_time_functions_test.cpp
@@ -78,8 +78,8 @@ BOOST_AUTO_TEST_CASE(TestDayofmonth)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn DAYOFMONTH(dateField)} FROM 
TestType", 29);
-    CheckSingleResult<int32_t>("SELECT {fn DAY_OF_MONTH(dateField)} FROM 
TestType", 29);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn DAYOFMONTH(dateField)} FROM 
TestType", 29);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn DAY_OF_MONTH(dateField)} FROM 
TestType", 29);
 }
 
 BOOST_AUTO_TEST_CASE(TestDayofweek)
@@ -90,8 +90,8 @@ BOOST_AUTO_TEST_CASE(TestDayofweek)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn DAYOFWEEK(dateField)} FROM 
TestType", 2);
-    CheckSingleResult<int32_t>("SELECT {fn DAY_OF_WEEK(dateField)} FROM 
TestType", 2);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn DAYOFWEEK(dateField)} FROM 
TestType", 2);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn DAY_OF_WEEK(dateField)} FROM 
TestType", 2);
 }
 
 BOOST_AUTO_TEST_CASE(TestDayofyear)
@@ -102,8 +102,8 @@ BOOST_AUTO_TEST_CASE(TestDayofyear)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn DAYOFYEAR(dateField)} FROM 
TestType", 242);
-    CheckSingleResult<int32_t>("SELECT {fn DAY_OF_YEAR(dateField)} FROM 
TestType", 242);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn DAYOFYEAR(dateField)} FROM 
TestType", 242);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn DAY_OF_YEAR(dateField)} FROM 
TestType", 242);
 }
 
 BOOST_AUTO_TEST_CASE(TestExtract)
@@ -114,12 +114,12 @@ BOOST_AUTO_TEST_CASE(TestExtract)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn EXTRACT(YEAR FROM timestampField)} 
FROM TestType", 2016);
-    CheckSingleResult<int32_t>("SELECT {fn EXTRACT(MONTH FROM timestampField)} 
FROM TestType", 2);
-    CheckSingleResult<int32_t>("SELECT {fn EXTRACT(DAY FROM timestampField)} 
FROM TestType", 24);
-    CheckSingleResult<int32_t>("SELECT {fn EXTRACT(HOUR FROM timestampField)} 
FROM TestType", 13);
-    CheckSingleResult<int32_t>("SELECT {fn EXTRACT(MINUTE FROM 
timestampField)} FROM TestType", 45);
-    CheckSingleResult<int32_t>("SELECT {fn EXTRACT(SECOND FROM 
timestampField)} FROM TestType", 23);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn EXTRACT(YEAR FROM 
timestampField)} FROM TestType", 2016);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn EXTRACT(MONTH FROM 
timestampField)} FROM TestType", 2);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn EXTRACT(DAY FROM 
timestampField)} FROM TestType", 24);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn EXTRACT(HOUR FROM 
timestampField)} FROM TestType", 13);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn EXTRACT(MINUTE FROM 
timestampField)} FROM TestType", 45);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn EXTRACT(SECOND FROM 
timestampField)} FROM TestType", 23);
 }
 
 BOOST_AUTO_TEST_CASE(TestHour)
@@ -130,7 +130,7 @@ BOOST_AUTO_TEST_CASE(TestHour)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn HOUR(timestampField)} FROM 
TestType", 13);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn HOUR(timestampField)} FROM 
TestType", 13);
 }
 
 BOOST_AUTO_TEST_CASE(TestMinute)
@@ -141,7 +141,7 @@ BOOST_AUTO_TEST_CASE(TestMinute)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn MINUTE(timestampField)} FROM 
TestType", 45);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn MINUTE(timestampField)} FROM 
TestType", 45);
 }
 
 BOOST_AUTO_TEST_CASE(TestMonth)
@@ -152,7 +152,7 @@ BOOST_AUTO_TEST_CASE(TestMonth)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn MONTH(timestampField)} FROM 
TestType", 2);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn MONTH(timestampField)} FROM 
TestType", 2);
 }
 
 BOOST_AUTO_TEST_CASE(TestMonthname)
@@ -179,7 +179,7 @@ BOOST_AUTO_TEST_CASE(TestQuarter)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn QUARTER(timestampField)} FROM 
TestType", 1);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn QUARTER(timestampField)} FROM 
TestType", 1);
 }
 
 BOOST_AUTO_TEST_CASE(TestSecond)
@@ -190,7 +190,7 @@ BOOST_AUTO_TEST_CASE(TestSecond)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn SECOND(timestampField)} FROM 
TestType", 23);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn SECOND(timestampField)} FROM 
TestType", 23);
 }
 
 BOOST_AUTO_TEST_CASE(TestWeek)
@@ -201,7 +201,7 @@ BOOST_AUTO_TEST_CASE(TestWeek)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn WEEK(timestampField)} FROM 
TestType", 9);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn WEEK(timestampField)} FROM 
TestType", 9);
 }
 
 BOOST_AUTO_TEST_CASE(TestYear)
@@ -212,7 +212,7 @@ BOOST_AUTO_TEST_CASE(TestYear)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn YEAR(timestampField)} FROM 
TestType", 2016);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn YEAR(timestampField)} FROM 
TestType", 2016);
 }
 
 BOOST_AUTO_TEST_SUITE_END()

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/sql_esc_convert_function_test.cpp
----------------------------------------------------------------------
diff --git 
a/modules/platforms/cpp/odbc-test/src/sql_esc_convert_function_test.cpp 
b/modules/platforms/cpp/odbc-test/src/sql_esc_convert_function_test.cpp
index 6879519..f583d02 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_esc_convert_function_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_esc_convert_function_test.cpp
@@ -69,17 +69,17 @@ BOOST_AUTO_TEST_CASE(TestEscConvertFunctionGetInfo)
 
 BOOST_AUTO_TEST_CASE(TestEscConvertFunctionInt64)
 {
-    CheckSingleResult<int64_t>("SELECT {fn CONVERT(72623859790382856, 
SQL_BIGINT)}", 72623859790382856);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn CONVERT(72623859790382856, 
SQL_BIGINT)}", 72623859790382856);
 }
 
 BOOST_AUTO_TEST_CASE(TestEscConvertFunctionInt32)
 {
-    CheckSingleResult<int32_t>("SELECT {fn CONVERT(1234567890, SQL_INTEGER)}", 
1234567890);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn CONVERT(1234567890, 
SQL_INTEGER)}", 1234567890);
 }
 
 BOOST_AUTO_TEST_CASE(TestEscConvertFunctionInt16)
 {
-    CheckSingleResult<int16_t>("SELECT {fn CONVERT(12345, SQL_SMALLINT)}", 
12345);
+    CheckSingleResult<SQLSMALLINT>("SELECT {fn CONVERT(12345, SQL_SMALLINT)}", 
12345);
 }
 
 BOOST_AUTO_TEST_CASE(TestEscConvertFunctionInt8)

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/sql_numeric_functions_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_numeric_functions_test.cpp 
b/modules/platforms/cpp/odbc-test/src/sql_numeric_functions_test.cpp
index 723f784..97e203b 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_numeric_functions_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_numeric_functions_test.cpp
@@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE(TestNumericFunctionAbs)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn ABS(i32Field)} FROM TestType", 
std::abs(in.i32Field));
+    CheckSingleResult<SQLINTEGER>("SELECT {fn ABS(i32Field)} FROM TestType", 
std::abs(in.i32Field));
 }
 
 BOOST_AUTO_TEST_CASE(TestNumericFunctionAcos)
@@ -206,7 +206,7 @@ BOOST_AUTO_TEST_CASE(TestNumericFunctionMod)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int64_t>("SELECT {fn MOD(i64Field, 3)} FROM TestType", 
in.i64Field % 3);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn MOD(i64Field, 3)} FROM TestType", 
in.i64Field % 3);
 }
 
 BOOST_AUTO_TEST_CASE(TestNumericFunctionPi)

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/sql_operators_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_operators_test.cpp 
b/modules/platforms/cpp/odbc-test/src/sql_operators_test.cpp
index de884ca..d47f0fb 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_operators_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_operators_test.cpp
@@ -38,27 +38,27 @@ BOOST_FIXTURE_TEST_SUITE(SqlOperatorTestSuite, 
ignite::SqlTestSuiteFixture)
 
 BOOST_AUTO_TEST_CASE(TestOperatorAddInt)
 {
-    CheckSingleResult<int32_t>("SELECT 123 + 51", 123 + 51);
+    CheckSingleResult<SQLINTEGER>("SELECT 123 + 51", 123 + 51);
 };
 
 BOOST_AUTO_TEST_CASE(TestOperatorSubInt)
 {
-    CheckSingleResult<int32_t>("SELECT 123 - 51", 123 - 51);
+    CheckSingleResult<SQLINTEGER>("SELECT 123 - 51", 123 - 51);
 };
 
 BOOST_AUTO_TEST_CASE(TestOperatorDivInt)
 {
-    CheckSingleResult<int32_t>("SELECT 123 / 51", 123 / 51);
+    CheckSingleResult<SQLINTEGER>("SELECT 123 / 51", 123 / 51);
 };
 
 BOOST_AUTO_TEST_CASE(TestOperatorModInt)
 {
-    CheckSingleResult<int32_t>("SELECT 123 % 51", 123 % 51);
+    CheckSingleResult<SQLINTEGER>("SELECT 123 % 51", 123 % 51);
 };
 
 BOOST_AUTO_TEST_CASE(TestOperatorMultInt)
 {
-    CheckSingleResult<int32_t>("SELECT 123 * 51", 123 * 51);
+    CheckSingleResult<SQLINTEGER>("SELECT 123 * 51", 123 * 51);
 };
 
 BOOST_AUTO_TEST_CASE(TestOperatorAddDouble)

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/sql_string_functions_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_string_functions_test.cpp 
b/modules/platforms/cpp/odbc-test/src/sql_string_functions_test.cpp
index 389f2f4..5a932f1 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_string_functions_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_string_functions_test.cpp
@@ -59,7 +59,7 @@ BOOST_AUTO_TEST_CASE(TestStringFunctionAscii)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn ASCII(strField)} FROM TestType", 
static_cast<int32_t>('H'));
+    CheckSingleResult<SQLINTEGER>("SELECT {fn ASCII(strField)} FROM TestType", 
static_cast<int32_t>('H'));
 }
 
 BOOST_AUTO_TEST_CASE(TestStringFunctionBitLength)
@@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE(TestStringFunctionBitLength)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int64_t>("SELECT {fn BIT_LENGTH(strField)} FROM 
TestType", in.strField.size() * 16);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn BIT_LENGTH(strField)} FROM 
TestType", in.strField.size() * 16);
 }
 
 BOOST_AUTO_TEST_CASE(TestStringFunctionChar)
@@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE(TestStringFunctionCharLength)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int64_t>("SELECT {fn CHAR_LENGTH(strField)} FROM 
TestType", in.strField.size());
+    CheckSingleResult<SQLBIGINT>("SELECT {fn CHAR_LENGTH(strField)} FROM 
TestType", in.strField.size());
 }
 
 BOOST_AUTO_TEST_CASE(TestStringFunctionCharacterLength)
@@ -100,7 +100,7 @@ BOOST_AUTO_TEST_CASE(TestStringFunctionCharacterLength)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int64_t>("SELECT {fn CHARACTER_LENGTH(strField)} FROM 
TestType", in.strField.size());
+    CheckSingleResult<SQLBIGINT>("SELECT {fn CHARACTER_LENGTH(strField)} FROM 
TestType", in.strField.size());
 }
 
 BOOST_AUTO_TEST_CASE(TestStringFunctionConcat)
@@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE(TestStringFunctionDifference)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT {fn DIFFERENCE(strField, \'Hola!\')} 
FROM TestType", 4);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn DIFFERENCE(strField, \'Hola!\')} 
FROM TestType", 4);
 }
 
 BOOST_AUTO_TEST_CASE(TestStringFunctionInsert)
@@ -161,7 +161,7 @@ BOOST_AUTO_TEST_CASE(TestStringFunctionLength)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int64_t>("SELECT {fn LENGTH(strField)} FROM TestType", 
in.strField.size());
+    CheckSingleResult<SQLBIGINT>("SELECT {fn LENGTH(strField)} FROM TestType", 
in.strField.size());
 }
 
 BOOST_AUTO_TEST_CASE(TestStringFunctionLocate)
@@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE(TestStringFunctionLocate)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int64_t>("SELECT {fn LOCATE(\'ip\', strField)} FROM 
TestType", 7);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn LOCATE(\'ip\', strField)} FROM 
TestType", 7);
 }
 
 BOOST_AUTO_TEST_CASE(TestStringFunctionLocate2)
@@ -181,7 +181,7 @@ BOOST_AUTO_TEST_CASE(TestStringFunctionLocate2)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int64_t>("SELECT {fn LOCATE(\'ip\', strField, 10)} FROM 
TestType", 43);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn LOCATE(\'ip\', strField, 10)} 
FROM TestType", 43);
 }
 
 BOOST_AUTO_TEST_CASE(TestStringFunctionLtrim)
@@ -201,7 +201,7 @@ BOOST_AUTO_TEST_CASE(TestStringFunctionOctetLength)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int64_t>("SELECT {fn OCTET_LENGTH(strField)} FROM 
TestType", in.strField.size() * 2);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn OCTET_LENGTH(strField)} FROM 
TestType", in.strField.size() * 2);
 }
 
 BOOST_AUTO_TEST_CASE(TestStringFunctionPosition)
@@ -211,7 +211,7 @@ BOOST_AUTO_TEST_CASE(TestStringFunctionPosition)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int64_t>("SELECT {fn POSITION(\'sit\', strField)} FROM 
TestType", 19);
+    CheckSingleResult<SQLBIGINT>("SELECT {fn POSITION(\'sit\', strField)} FROM 
TestType", 19);
 }
 
 BOOST_AUTO_TEST_CASE(TestStringFunctionRepeat)

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/sql_system_functions_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_system_functions_test.cpp 
b/modules/platforms/cpp/odbc-test/src/sql_system_functions_test.cpp
index 30fa036..2496bc7 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_system_functions_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_system_functions_test.cpp
@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE(TestSystemFunctionUser)
 
 BOOST_AUTO_TEST_CASE(TestSystemFunctionIfnull)
 {
-    CheckSingleResult<int32_t>("SELECT {fn IFNULL(NULL, 42)}", 42);
+    CheckSingleResult<SQLINTEGER>("SELECT {fn IFNULL(NULL, 42)}", 42);
 }
 
 BOOST_AUTO_TEST_SUITE_END()

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp 
b/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp
index 42dd3f7..31d6717 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_test_suite_fixture.cpp
@@ -133,21 +133,21 @@ namespace ignite
     }
 
     template<>
-    void SqlTestSuiteFixture::CheckSingleResult<int64_t>(const char* request, 
const int64_t& expected)
+    void SqlTestSuiteFixture::CheckSingleResult<SQLBIGINT>(const char* 
request, const SQLBIGINT& expected)
     {
-        CheckSingleResultNum0<int64_t>(request, expected, SQL_C_SBIGINT);
+        CheckSingleResultNum0<SQLBIGINT>(request, expected, SQL_C_SBIGINT);
     }
 
     template<>
-    void SqlTestSuiteFixture::CheckSingleResult<int32_t>(const char* request, 
const int32_t& expected)
+    void SqlTestSuiteFixture::CheckSingleResult<SQLINTEGER>(const char* 
request, const SQLINTEGER& expected)
     {
-        CheckSingleResultNum0<int32_t>(request, expected, SQL_C_SLONG);
+        CheckSingleResultNum0<SQLINTEGER>(request, expected, SQL_C_SLONG);
     }
 
     template<>
-    void SqlTestSuiteFixture::CheckSingleResult<int16_t>(const char* request, 
const int16_t& expected)
+    void SqlTestSuiteFixture::CheckSingleResult<SQLSMALLINT>(const char* 
request, const SQLSMALLINT& expected)
     {
-        CheckSingleResultNum0<int16_t>(request, expected, SQL_C_SSHORT);
+        CheckSingleResultNum0<SQLSMALLINT>(request, expected, SQL_C_SSHORT);
     }
 
     template<>
@@ -213,21 +213,21 @@ namespace ignite
     }
 
     template<>
-    void SqlTestSuiteFixture::CheckSingleResult<int64_t>(const char* request)
+    void SqlTestSuiteFixture::CheckSingleResult<SQLBIGINT>(const char* request)
     {
-        CheckSingleResultNum0<int64_t>(request, SQL_C_SBIGINT);
+        CheckSingleResultNum0<SQLBIGINT>(request, SQL_C_SBIGINT);
     }
 
     template<>
-    void SqlTestSuiteFixture::CheckSingleResult<int32_t>(const char* request)
+    void SqlTestSuiteFixture::CheckSingleResult<SQLINTEGER>(const char* 
request)
     {
-        CheckSingleResultNum0<int32_t>(request, SQL_C_SLONG);
+        CheckSingleResultNum0<SQLINTEGER>(request, SQL_C_SLONG);
     }
 
     template<>
-    void SqlTestSuiteFixture::CheckSingleResult<int16_t>(const char* request)
+    void SqlTestSuiteFixture::CheckSingleResult<SQLSMALLINT>(const char* 
request)
     {
-        CheckSingleResultNum0<int16_t>(request, SQL_C_SSHORT);
+        CheckSingleResultNum0<SQLSMALLINT>(request, SQL_C_SSHORT);
     }
 
     template<>

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/sql_types_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_types_test.cpp 
b/modules/platforms/cpp/odbc-test/src/sql_types_test.cpp
index 60d9d7e..6ec6250 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_types_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_types_test.cpp
@@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(TestGuidEqualsToColumn)
     testCache.Put(1, in1);
     testCache.Put(2, in2);
 
-    CheckSingleResult<int32_t>(
+    CheckSingleResult<SQLINTEGER>(
         "SELECT i32Field FROM TestType WHERE guidField = {guid 
'04cc382a-0b82-f520-08d0-07a0620c0004'}", in2.i32Field);
 }
 
@@ -197,7 +197,7 @@ BOOST_AUTO_TEST_CASE(TestTimestampSelect)
 
     testCache.Put(1, in1);
 
-    CheckSingleResult<int32_t>(
+    CheckSingleResult<SQLINTEGER>(
         "SELECT i32Field FROM TestType WHERE timestampField = '2017-01-13 
19:54:01.987654321'", in1.i32Field);
 
     CheckSingleResult<Timestamp>(
@@ -259,7 +259,7 @@ BOOST_AUTO_TEST_CASE(TestTimeSelect)
 
     testCache.Put(1, in1);
 
-    CheckSingleResult<int32_t>("SELECT i32Field FROM TestType WHERE timeField 
= '19:54:01'", in1.i32Field);
+    CheckSingleResult<SQLINTEGER>("SELECT i32Field FROM TestType WHERE 
timeField = '19:54:01'", in1.i32Field);
 
     CheckSingleResult<Time>("SELECT timeField FROM TestType WHERE i32Field = 
1", in1.timeField);
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/odbc-test/src/sql_value_expressions_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/sql_value_expressions_test.cpp 
b/modules/platforms/cpp/odbc-test/src/sql_value_expressions_test.cpp
index fd12688..32d49d3 100644
--- a/modules/platforms/cpp/odbc-test/src/sql_value_expressions_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/sql_value_expressions_test.cpp
@@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE(TestCase)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>(
+    SqlTestSuiteFixture::CheckSingleResult<SQLINTEGER>(
         "SELECT "
             "CASE i32Field WHEN 82 "
                 "THEN (i32Field / 2) "
@@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE(TestCase)
             "END "
         "FROM TestType", in.i32Field / 2);
 
-    CheckSingleResult<int32_t>(
+    SqlTestSuiteFixture::CheckSingleResult<SQLINTEGER>(
         "SELECT "
             "CASE i32Field WHEN 22 "
                 "THEN (i32Field / 2) "
@@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE(TestCast)
 
     testCache.Put(1, in);
 
-    CheckSingleResult<int32_t>("SELECT CAST(strField AS INT) + i32Field FROM 
TestType", 
+    CheckSingleResult<SQLINTEGER>("SELECT CAST(strField AS INT) + i32Field 
FROM TestType", 
         common::LexicalCast<int32_t>(in.strField) + in.i32Field);
 
     CheckSingleResult<std::string>("SELECT CAST(i32Field AS VARCHAR) || 
strField FROM TestType",

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/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 de8ca6a..4b9845d 100644
--- a/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
+++ b/modules/platforms/cpp/odbc/src/app/application_data_buffer.cpp
@@ -144,42 +144,42 @@ namespace ignite
 
                     case OdbcNativeType::AI_SIGNED_SHORT:
                     {
-                        return PutNumToNumBuffer<short>(value);
+                        return PutNumToNumBuffer<SQLSMALLINT>(value);
                     }
 
                     case OdbcNativeType::AI_UNSIGNED_SHORT:
                     {
-                        return PutNumToNumBuffer<unsigned short>(value);
+                        return PutNumToNumBuffer<SQLUSMALLINT>(value);
                     }
 
                     case OdbcNativeType::AI_SIGNED_LONG:
                     {
-                        return PutNumToNumBuffer<long>(value);
+                        return PutNumToNumBuffer<SQLINTEGER>(value);
                     }
 
                     case OdbcNativeType::AI_UNSIGNED_LONG:
                     {
-                        return PutNumToNumBuffer<unsigned long>(value);
+                        return PutNumToNumBuffer<SQLUINTEGER>(value);
                     }
 
                     case OdbcNativeType::AI_SIGNED_BIGINT:
                     {
-                        return PutNumToNumBuffer<int64_t>(value);
+                        return PutNumToNumBuffer<SQLBIGINT>(value);
                     }
 
                     case OdbcNativeType::AI_UNSIGNED_BIGINT:
                     {
-                        return PutNumToNumBuffer<uint64_t>(value);
+                        return PutNumToNumBuffer<SQLUBIGINT>(value);
                     }
 
                     case OdbcNativeType::AI_FLOAT:
                     {
-                        return PutNumToNumBuffer<float>(value);
+                        return PutNumToNumBuffer<SQLREAL>(value);
                     }
 
                     case OdbcNativeType::AI_DOUBLE:
                     {
-                        return PutNumToNumBuffer<double>(value);
+                        return PutNumToNumBuffer<SQLDOUBLE>(value);
                     }
 
                     case OdbcNativeType::AI_CHAR:

http://git-wip-us.apache.org/repos/asf/ignite/blob/0020e417/modules/platforms/cpp/thin-client/include/ignite/impl/thin/readable.h
----------------------------------------------------------------------
diff --git 
a/modules/platforms/cpp/thin-client/include/ignite/impl/thin/readable.h 
b/modules/platforms/cpp/thin-client/include/ignite/impl/thin/readable.h
index 8c3e337..458da25 100644
--- a/modules/platforms/cpp/thin-client/include/ignite/impl/thin/readable.h
+++ b/modules/platforms/cpp/thin-client/include/ignite/impl/thin/readable.h
@@ -84,7 +84,7 @@ namespace ignite
                  */
                 virtual void Read(binary::BinaryReaderImpl& reader)
                 {
-                    reader.ReadTopObject0(value);
+                    reader.ReadTopObject0<ignite::binary::BinaryReader, 
ValueType>(value);
                 }
 
             private:

Reply via email to