Repository: ignite Updated Branches: refs/heads/ignite-1786 e0226fc33 -> d18d11ce1
IGNITE-2544: Empty schema names treated as a 'null' now. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d22c530c Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d22c530c Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d22c530c Branch: refs/heads/ignite-1786 Commit: d22c530ca691ca54ad2f54a77d4e0df967fd380a Parents: d55dc36 Author: isapego <[email protected]> Authored: Thu Feb 4 13:06:04 2016 +0300 Committer: isapego <[email protected]> Committed: Thu Feb 4 13:06:04 2016 +0300 ---------------------------------------------------------------------- .../internal/processors/odbc/OdbcQueryExecuteRequest.java | 2 +- modules/platforms/cpp/odbc/src/config/configuration.cpp | 4 ++-- modules/platforms/cpp/odbc/src/connection.cpp | 7 ------- modules/platforms/cpp/odbc/src/statement.cpp | 7 +------ 4 files changed, 4 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/d22c530c/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcQueryExecuteRequest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcQueryExecuteRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcQueryExecuteRequest.java index 1ed909a..dd45f77 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcQueryExecuteRequest.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/OdbcQueryExecuteRequest.java @@ -38,7 +38,7 @@ public class OdbcQueryExecuteRequest extends OdbcRequest { public OdbcQueryExecuteRequest(String cacheName, String sqlQry, Object[] args) { super(EXECUTE_SQL_QUERY); - this.cacheName = cacheName; + this.cacheName = cacheName.isEmpty() ? null : cacheName; this.sqlQry = sqlQry; this.args = args; } http://git-wip-us.apache.org/repos/asf/ignite/blob/d22c530c/modules/platforms/cpp/odbc/src/config/configuration.cpp ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/odbc/src/config/configuration.cpp b/modules/platforms/cpp/odbc/src/config/configuration.cpp index 08ee54b..2ff05bc 100644 --- a/modules/platforms/cpp/odbc/src/config/configuration.cpp +++ b/modules/platforms/cpp/odbc/src/config/configuration.cpp @@ -47,7 +47,7 @@ namespace ignite const uint16_t port = 11443; /** Default value for cache attribute. */ - const std::string cache = "Persons"; + const std::string cache = ""; } /** Connection attribute keywords. */ @@ -65,7 +65,7 @@ namespace ignite /** Connection attribute keyword for server port attribute. */ const std::string port = "port"; - /** Default value for cache attribute. */ + /** Connection attribute keyword for cache attribute. */ const std::string cache = "cache"; } http://git-wip-us.apache.org/repos/asf/ignite/blob/d22c530c/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 28cd7ca..5277038 100644 --- a/modules/platforms/cpp/odbc/src/connection.cpp +++ b/modules/platforms/cpp/odbc/src/connection.cpp @@ -107,13 +107,6 @@ namespace ignite return SQL_RESULT_ERROR; } - if (cache.empty()) - { - AddStatusRecord(SQL_STATE_HY000_GENERAL_ERROR, "Cache is not specified."); - - return SQL_RESULT_ERROR; - } - this->cache = cache; connected = socket.Connect(host.c_str(), port); http://git-wip-us.apache.org/repos/asf/ignite/blob/d22c530c/modules/platforms/cpp/odbc/src/statement.cpp ---------------------------------------------------------------------- diff --git a/modules/platforms/cpp/odbc/src/statement.cpp b/modules/platforms/cpp/odbc/src/statement.cpp index 4bf0db9..96a6327 100644 --- a/modules/platforms/cpp/odbc/src/statement.cpp +++ b/modules/platforms/cpp/odbc/src/statement.cpp @@ -256,12 +256,7 @@ namespace ignite if (currentQuery.get()) currentQuery->Close(); - std::string cache(schema); - - if (cache.empty()) - cache = connection.GetCache(); - - currentQuery.reset(new query::TableMetadataQuery(*this, connection, catalog, cache, table, tableType)); + currentQuery.reset(new query::TableMetadataQuery(*this, connection, catalog, schema, table, tableType)); return currentQuery->Execute(); }
