ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From isap...@apache.org
Subject ignite git commit: IGNITE-6151: Review fixes
Date Tue, 12 Sep 2017 13:12:10 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 0bc1d8477 -> 8c2380568


IGNITE-6151: Review fixes


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

Branch: refs/heads/master
Commit: 8c2380568093ed6566c983d4cb11e10c1d7a68c1
Parents: 0bc1d84
Author: Igor Sapego <isapego@gridgain.com>
Authored: Tue Sep 12 16:10:51 2017 +0300
Committer: Igor Sapego <isapego@gridgain.com>
Committed: Tue Sep 12 16:10:51 2017 +0300

----------------------------------------------------------------------
 modules/platforms/cpp/odbc-test/src/attributes_test.cpp | 4 ++--
 modules/platforms/cpp/odbc/src/connection.cpp           | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8c238056/modules/platforms/cpp/odbc-test/src/attributes_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc-test/src/attributes_test.cpp b/modules/platforms/cpp/odbc-test/src/attributes_test.cpp
index 3ac46cb..f8cb5ac 100644
--- a/modules/platforms/cpp/odbc-test/src/attributes_test.cpp
+++ b/modules/platforms/cpp/odbc-test/src/attributes_test.cpp
@@ -180,7 +180,7 @@ BOOST_AUTO_TEST_CASE(ConnectionAttributeConnectionDeadGet)
 {
     Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
-    SQLINTEGER dead = SQL_CD_TRUE;
+    SQLUINTEGER dead = SQL_CD_TRUE;
     SQLRETURN ret;
 
     ret = SQLGetConnectAttr(dbc, SQL_ATTR_CONNECTION_DEAD, &dead, 0, 0);
@@ -194,7 +194,7 @@ BOOST_AUTO_TEST_CASE(ConnectionAttributeConnectionDeadSet)
 {
     Connect("DRIVER={Apache Ignite};address=127.0.0.1:11110;schema=cache");
 
-    SQLINTEGER dead = SQL_CD_TRUE;
+    SQLUINTEGER dead = SQL_CD_TRUE;
     SQLRETURN ret;
 
     ret = SQLSetConnectAttr(dbc, SQL_ATTR_CONNECTION_DEAD, &dead, 0);

http://git-wip-us.apache.org/repos/asf/ignite/blob/8c238056/modules/platforms/cpp/odbc/src/connection.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/odbc/src/connection.cpp b/modules/platforms/cpp/odbc/src/connection.cpp
index 53626d1..472eb75 100644
--- a/modules/platforms/cpp/odbc/src/connection.cpp
+++ b/modules/platforms/cpp/odbc/src/connection.cpp
@@ -351,9 +351,9 @@ namespace ignite
             {
                 case SQL_ATTR_CONNECTION_DEAD:
                 {
-                    SQLINTEGER *val = reinterpret_cast<SQLINTEGER*>(buf);
+                    SQLUINTEGER *val = reinterpret_cast<SQLUINTEGER*>(buf);
 
-                    *val = static_cast<SQLINTEGER>(connected ? SQL_CD_FALSE : SQL_CD_TRUE);
+                    *val = connected ? SQL_CD_FALSE : SQL_CD_TRUE;
 
                     if (valueLen)
                         *valueLen = SQL_IS_INTEGER;
@@ -384,7 +384,7 @@ namespace ignite
             {
                 case SQL_ATTR_CONNECTION_DEAD:
                 {
-                    AddStatusRecord(SqlState::SHY092_OPTION_TYPE_OUT_OF_RANGE, "Attribute
can not be retrieved.");
+                    AddStatusRecord(SqlState::SHY092_OPTION_TYPE_OUT_OF_RANGE, "Attribute
is read only.");
 
                     return SqlResult::AI_ERROR;
                 }


Mime
View raw message