diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2017-08-05 18:08:51 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2017-08-05 18:08:51 +0200 |
commit | d8f99f165bf4f88cb9b0ccb0c58d8a129bf4f18c (patch) | |
tree | 230c5bcb4313827db5574673b72eb60d2d06c08e /storage/connect/jdbconn.cpp | |
parent | df3fd420e5999b568993e7d3a9a372ec29bca7d0 (diff) | |
download | mariadb-git-d8f99f165bf4f88cb9b0ccb0c58d8a129bf4f18c.tar.gz |
- Add FBLOCK when opening ODBC, JSON and MONGO tables.
This to have automatic closing in case of thrown error.
modified: storage/connect/cmgoconn.cpp
modified: storage/connect/cmgoconn.h
modified: storage/connect/filamzip.cpp
modified: storage/connect/javaconn.cpp
modified: storage/connect/javaconn.h
modified: storage/connect/odbconn.cpp
modified: storage/connect/odbconn.h
modified: storage/connect/plgdbsem.h
modified: storage/connect/plgdbutl.cpp
- Fix INCOL bug when inserting several lines to MONGO tables
modified: storage/connect/cmgoconn.cpp
modified: storage/connect/tabcmg.cpp
modified: storage/connect/tabjmg.cpp
- MONGO_SUPPORT is set for both MongoDB drivers
CMGO_SUPPORT is set only when the C driver is available
modified: storage/connect/CMakeLists.txt
modified: storage/connect/filter.h
modified: storage/connect/filter.h
modified: storage/connect/ha_connect.cc
modified: storage/connect/mongo.cpp
modified: storage/connect/mycat.cc
modified: storage/connect/tabjson.cpp
modified: storage/connect/tabjson.h
- Separate enums JCATINFO and
modified: storage/connect/javaconn.h
modified: storage/connect/jdbconn.cpp
- Fix crash when executing JDBC catfunc=driver
modified: storage/connect/jdbconn.cpp
- Report an error when the Mongo driver if explicitly
specified and not supported.
modified: storage/connect/mongo.cpp
- Fix bug causing catalog JSON tables to fail
modified: storage/connect/tabjson.cpp
- Protect by mutex the Ready variable of the TBLTBM table type
modified: storage/connect/tabtbl.cpp
- Put testing of Thread TBL tables in a separate test
With added case and modified old case that could avoid the test to fail.
modified: storage/connect/mysql-test/connect/r/tbl.result
modified: storage/connect/mysql-test/connect/t/tbl.test
new file: storage/connect/mysql-test/connect/r/tbl_thread.result
new file: storage/connect/mysql-test/connect/t/tbl_thread.test
- jmongo3.test no more exists
deleted: storage/connect/mysql-test/connect/t/jmongo3.test
- Add new tests for the MONGO feature (disabled)
modified: storage/connect/mysql-test/connect/disabled.def
new file: storage/connect/mysql-test/connect/r/json_java_2.result
new file: storage/connect/mysql-test/connect/r/json_java_3.result
new file: storage/connect/mysql-test/connect/r/json_mongo_c.result
new file: storage/connect/mysql-test/connect/r/mongo_c.result
new file: storage/connect/mysql-test/connect/r/mongo_java_2.result
new file: storage/connect/mysql-test/connect/r/mongo_java_3.result
new file: storage/connect/mysql-test/connect/std_data/Mongo2.jar
new file: storage/connect/mysql-test/connect/std_data/cities.json
new file: storage/connect/mysql-test/connect/t/json_java_2.test
new file: storage/connect/mysql-test/connect/t/json_java_3.test
new file: storage/connect/mysql-test/connect/t/json_mongo_c.test
new file: storage/connect/mysql-test/connect/t/mongo.inc
new file: storage/connect/mysql-test/connect/t/mongo_c.test
new file: storage/connect/mysql-test/connect/t/mongo_java_2.test
new file: storage/connect/mysql-test/connect/t/mongo_java_3.test
new file: storage/connect/mysql-test/connect/t/mongo_test.inc
Diffstat (limited to 'storage/connect/jdbconn.cpp')
-rw-r--r-- | storage/connect/jdbconn.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/storage/connect/jdbconn.cpp b/storage/connect/jdbconn.cpp index e0524392082..35df7ba75f7 100644 --- a/storage/connect/jdbconn.cpp +++ b/storage/connect/jdbconn.cpp @@ -289,7 +289,7 @@ PQRYRES JDBCColumns(PGLOBAL g, PCSZ db, PCSZ table, PCSZ colpat, if (trace) htrc("Getting col results ncol=%d\n", qrp->Nbcol); - if (!(cap = AllocCatInfo(g, CAT_COL, db, table, qrp))) + if (!(cap = AllocCatInfo(g, JCAT_COL, db, table, qrp))) return NULL; // Colpat cannot be null or empty for some drivers @@ -410,7 +410,7 @@ PQRYRES JDBCTables(PGLOBAL g, PCSZ db, PCSZ tabpat, PCSZ tabtyp, return qrp; // Tabpat cannot be null or empty for some drivers - if (!(cap = AllocCatInfo(g, CAT_TAB, db, + if (!(cap = AllocCatInfo(g, JCAT_TAB, db, (tabpat && *tabpat) ? tabpat : PlugDup(g, "%"), qrp))) return NULL; @@ -465,7 +465,7 @@ PQRYRES JDBCDrivers(PGLOBAL g, int maxres, bool info) if (!info) { jcp = new(g) JDBConn(g, NULL); - if (jcp->Open(NULL) != RC_OK) + if (jcp->Open(g) != RC_OK) return NULL; if (!maxres) @@ -1407,28 +1407,19 @@ bool JDBConn::SetParam(JDBCCOL *colp) // Now do call the proper JDBC API switch (cap->Id) { - case CAT_COL: + case JCAT_COL: fnc = "GetColumns"; break; - case CAT_TAB: + case JCAT_TAB: fnc = "GetTables"; break; #if 0 - case CAT_KEY: + case JCAT_KEY: fnc = "SQLPrimaryKeys"; rc = SQLPrimaryKeys(hstmt, name.ptr(2), name.length(2), name.ptr(1), name.length(1), name.ptr(0), name.length(0)); break; - case CAT_STAT: - fnc = "SQLStatistics"; - rc = SQLStatistics(hstmt, name.ptr(2), name.length(2), - name.ptr(1), name.length(1), - name.ptr(0), name.length(0), - cap->Unique, cap->Accuracy); - break; - case CAT_SPC: - ThrowDJX("SQLSpecialColumns not available yet"); #endif // 0 default: sprintf(g->Message, "Invalid SQL function id"); |