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-8764: Fixed issue with Informatica on Windows
Date Sat, 09 Jun 2018 15:17:05 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 516d6f36d -> ec9e44e3f


IGNITE-8764: Fixed issue with Informatica on Windows

This closes #4168


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

Branch: refs/heads/master
Commit: ec9e44e3f11a2150f0c8e481e368d3ca52ec49fa
Parents: 516d6f3
Author: Igor Sapego <isapego@gridgain.com>
Authored: Sat Jun 9 18:15:56 2018 +0300
Committer: Igor Sapego <isapego@gridgain.com>
Committed: Sat Jun 9 18:15:56 2018 +0300

----------------------------------------------------------------------
 .../odbc/odbc/OdbcRequestHandler.java           | 14 +++++++++--
 modules/platforms/cpp/odbc/src/connection.cpp   | 26 ++++++++++++++------
 2 files changed, 31 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ec9e44e3/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
index 82e93c3..bf0601b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcRequestHandler.java
@@ -643,8 +643,18 @@ public class OdbcRequestHandler implements ClientListenerRequestHandler
{
      * @return Whether string matches pattern.
      */
     private static boolean matches(String str, String ptrn) {
-        return str != null && (F.isEmpty(ptrn) ||
-            str.toUpperCase().matches(ptrn.toUpperCase().replace("%", ".*").replace("_",
".")));
+        if (F.isEmpty(ptrn))
+            return true;
+
+        if (str == null)
+            return false;
+
+        String pattern = ptrn.toUpperCase().replace("%", ".*").replace("_", ".");
+
+        if (pattern.length() >= 2 && pattern.matches("['\"].*['\"]"))
+            pattern = pattern.substring(1, pattern.length() - 1);
+
+        return str.toUpperCase().matches(pattern);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/ec9e44e3/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 b96753c..4a28bbf 100644
--- a/modules/platforms/cpp/odbc/src/connection.cpp
+++ b/modules/platforms/cpp/odbc/src/connection.cpp
@@ -448,6 +448,15 @@ namespace ignite
                     break;
                 }
 
+                case SQL_ATTR_AUTOCOMMIT:
+                {
+                    SQLUINTEGER *val = reinterpret_cast<SQLUINTEGER*>(buf);
+
+                    *val = SQL_AUTOCOMMIT_ON;
+
+                    break;
+                }
+
                 default:
                 {
                     AddStatusRecord(SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,
@@ -467,13 +476,6 @@ namespace ignite
 
         SqlResult::Type Connection::InternalSetAttribute(int attr, void* value, SQLINTEGER
valueLen)
         {
-            if (!value)
-            {
-                AddStatusRecord(SqlState::SHY009_INVALID_USE_OF_NULL_POINTER, "Value pointer
is null.");
-
-                return SqlResult::AI_ERROR;
-            }
-
             switch (attr)
             {
                 case SQL_ATTR_CONNECTION_DEAD:
@@ -503,6 +505,16 @@ namespace ignite
                     break;
                 }
 
+                case SQL_ATTR_AUTOCOMMIT:
+                {
+                    SQLUINTEGER val = static_cast<SQLUINTEGER>(reinterpret_cast<ptrdiff_t>(value));
+
+                    if (val != SQL_AUTOCOMMIT_ON)
+                        return SqlResult::AI_ERROR;
+
+                    break;
+                }
+
                 default:
                 {
                     AddStatusRecord(SqlState::SHYC00_OPTIONAL_FEATURE_NOT_IMPLEMENTED,


Mime
View raw message