1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

- Update version number

modified:   storage/connect/ha_connect.cc

- Include MONGO in all Java enabled distributions
  Mongo will be enabled only for 10.2 and 10.3
  modified:   storage/connect/CMakeLists.txt

- Change JDBC_SUPPORT to JAVA_SUPPORT which also replaces MONGO_SUPPORT
  MONGO_SUPPORT is now just used to enable the MONGO table type
  modified:   storage/connect/filter.cpp
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h
  modified:   storage/connect/mongo.cpp
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h

- Move MakeSelector function from FILTER to mongo.cpp
  modified:   storage/connect/filter.cpp
  modified:   storage/connect/filter.h
  modified:   storage/connect/cmgoconn.cpp
  modified:   storage/connect/jmgoconn.cpp
  modified:   storage/connect/mongo.cpp

- Do mongo_init only on first use of the MongoDB C Driver
  This will permit to delay load the mongo lib on Windows
  modified:   storage/connect/cmgoconn.cpp
  modified:   storage/connect/cmgoconn.h
  modified:   storage/connect/ha_connect.cc

- Replace NEW_VAR by a test on MYSQL_VERSION_ID
  modified:   storage/connect/ha_connect.cc

- Suppress enable_mongo session variable
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mycat.cc

- Make some function headers identical in .h and .cc file
  (replacing const char* by PCSZ)
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h

- Change a parameter type from uchar* to const uchar*
  (for ScanRecord and CheckRecord)
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h

- Changes on LIKE and NOT LIKE does not fix a bug yet
  modified:   storage/connect/ha_connect.cc

- Suppress PIVOT_SUPPORT (PIVOT type is unconditionnal)
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mycat.cc

- Change the strz function from inline to static
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h

- export the JavaConn class and the MgoColumns and IsNum functions
  modified:   storage/connect/javaconn.h
  modified:   storage/connect/json.h
  modified:   storage/connect/mongo.h

- Fix MDEV-13924
  modified:   storage/connect/jdbconn.cpp

- Make a temporary fix for the compiler bug in CalculateArray
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjson.cpp

- Typo
  modified:   storage/connect/jdbccat.h
  modified:   storage/connect/reldef.h
  modified:   storage/connect/tabext.h
  modified:   storage/connect/tabjmg.cpp
  modified:   storage/connect/tabxml.h
  modified:   storage/connect/valblk.h
  modified:   storage/connect/value.h
  modified:   storage/connect/xtable.h

- Fix a bug in MONGO tests by changing 'MONGO' to $TYPE
  modified:   storage/connect/mysql-test/connect/t/mongo_test.inc

- Record test results to reflect all changes
  modified:   storage/connect/mysql-test/connect/r/json_java_2.result
  modified:   storage/connect/mysql-test/connect/r/json_java_3.result
  modified:   storage/connect/mysql-test/connect/r/json_mongo_c.result
  modified:   storage/connect/mysql-test/connect/r/mongo_c.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_2.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_3.result
This commit is contained in:
Olivier Bertrand
2017-10-15 16:13:23 +02:00
parent bf34e9db7b
commit bcfb5b2de9
35 changed files with 323 additions and 397 deletions

View File

@@ -25,6 +25,7 @@
#define nullptr 0
bool IsNum(PSZ s);
bool MakeSelector(PGLOBAL g, PFIL fp, PSTRG s);
/* --------------------------- Class JNCOL --------------------------- */
@@ -123,12 +124,13 @@ void JMgoConn::AddJars(PSTRG jpop, char sep)
#if defined(DEVELOPMENT)
if (m_Version == 2) {
jpop->Append(sep);
jpop->Append("C:/Eclipse/workspace/MongoWrap2/bin");
// jpop->Append("C:/Eclipse/workspace/MongoWrap2/bin");
jpop->Append(sep);
jpop->Append("C:/mongo-java-driver/mongo-java-driver-2.13.3.jar");
} else {
jpop->Append(sep);
jpop->Append("C:/Eclipse/workspace/MongoWrap3/bin");
// jpop->Append("C:/Eclipse/workspace/MongoWrap3/bin");
// jpop->Append("C:/Program Files/MariaDB 10.1/lib/plugin/JavaWrappers.jar");
jpop->Append(sep);
jpop->Append("C:/mongo-java-driver/mongo-java-driver-3.4.2.jar");
} // endif m_Version
@@ -238,6 +240,7 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options,
PSZ jp;
PCSZ op = NULL, sf = NULL, Options = options;
PSTRG s = NULL;
PFIL filp = tdbp->GetFilter();
if (Options && !stricmp(Options, "all")) {
Options = NULL;
@@ -264,10 +267,10 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options,
s = new(g) STRING(g, 1023, (PSZ)Options);
if (tdbp->GetFilter()) {
if (filp) {
s->Append(",{\"$match\":");
if (tdbp->GetFilter()->MakeSelector(g, s)) {
if (MakeSelector(g, filp, s)) {
strcpy(g->Message, "Failed making selector");
return NULL;
} else
@@ -314,15 +317,15 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options,
return AggregateCollection(p);
} else {
if (filter || tdbp->GetFilter()) {
if (filter || filp) {
if (trace) {
if (filter)
htrc("Filter: %s\n", filter);
if (tdbp->GetFilter()) {
if (filp) {
char buf[512];
tdbp->GetFilter()->Prints(g, buf, 511);
filp->Prints(g, buf, 511);
htrc("To_Filter: %s\n", buf);
} // endif To_Filter
@@ -331,11 +334,11 @@ bool JMgoConn::MakeCursor(PGLOBAL g, PTDB tdbp, PCSZ options,
s = new(g) STRING(g, 1023, (PSZ)filter);
len = s->GetLength();
if (tdbp->GetFilter()) {
if (filp) {
if (filter)
s->Append(',');
if (tdbp->GetFilter()->MakeSelector(g, s)) {
if (MakeSelector(g, filp, s)) {
strcpy(g->Message, "Failed making selector");
return NULL;
} // endif Selector