diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2018-01-30 15:43:20 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2018-01-30 15:43:20 +0100 |
commit | 5abdd20ca99101b772f1628dbd399c99294cda8e (patch) | |
tree | f27fa0294444e0c49898cb9bad3b3a228ad96518 /storage/connect/mycat.cc | |
parent | fc2d79480971645661b7debb7d0a21f515754b8d (diff) | |
download | mariadb-git-5abdd20ca99101b772f1628dbd399c99294cda8e.tar.gz |
- Use delayed load for the MongoDB C Drive on Windows
modified: storage/connect/CMakeLists.txt
modified: storage/connect/cmgoconn.cpp
modified: storage/connect/ha_connect.cc
- Add FORCE to the connect_type_conv enum values
This will translate binary values to TYPE_STRING
modified: storage/connect/checklvl.h
modified: storage/connect/ha_connect.cc
modified: storage/connect/odbconn.cpp
- Change the connect_xtrace variable to from int to set
modified: storage/connect/array.cpp
modified: storage/connect/blkfil.cpp
modified: storage/connect/block.h
modified: storage/connect/cmgoconn.cpp
modified: storage/connect/colblk.cpp
modified: storage/connect/connect.cc
modified: storage/connect/filamap.cpp
modified: storage/connect/filamdbf.cpp
modified: storage/connect/filamfix.cpp
modified: storage/connect/filamgz.cpp
modified: storage/connect/filamtxt.cpp
modified: storage/connect/filamvct.cpp
modified: storage/connect/filamzip.cpp
modified: storage/connect/filter.cpp
modified: storage/connect/global.h
modified: storage/connect/ha_connect.cc
modified: storage/connect/javaconn.cpp
modified: storage/connect/jdbconn.cpp
modified: storage/connect/jmgfam.cpp
modified: storage/connect/jmgoconn.cpp
modified: storage/connect/json.cpp
modified: storage/connect/jsonudf.cpp
modified: storage/connect/mongo.cpp
modified: storage/connect/mycat.cc
modified: storage/connect/myconn.cpp
modified: storage/connect/odbconn.cpp
modified: storage/connect/plgdbutl.cpp
modified: storage/connect/plugutil.cpp
modified: storage/connect/reldef.cpp
modified: storage/connect/tabcol.cpp
modified: storage/connect/tabdos.cpp
modified: storage/connect/tabext.cpp
modified: storage/connect/tabfix.cpp
modified: storage/connect/tabfmt.cpp
modified: storage/connect/tabjdbc.cpp
modified: storage/connect/tabjson.cpp
modified: storage/connect/table.cpp
modified: storage/connect/tabmul.cpp
modified: storage/connect/tabmysql.cpp
modified: storage/connect/tabodbc.cpp
modified: storage/connect/tabpivot.cpp
modified: storage/connect/tabsys.cpp
modified: storage/connect/tabtbl.cpp
modified: storage/connect/tabutil.cpp
modified: storage/connect/tabvct.cpp
modified: storage/connect/tabwmi.cpp
modified: storage/connect/tabxml.cpp
modified: storage/connect/user_connect.cc
modified: storage/connect/valblk.cpp
modified: storage/connect/value.cpp
modified: storage/connect/xindex.cpp
- Restore connect_enable_mongo variable (but undocumented)
modified: storage/connect/ha_connect.cc
modified: storage/connect/mycat.cc
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
modified: storage/connect/mysql-test/connect/r/tbl_thread.result
modified: storage/connect/mysql-test/connect/t/mongo.inc
modified: storage/connect/mysql-test/connect/t/mongo_test.inc
modified: storage/connect/mysql-test/connect/t/tbl_thread.test
Diffstat (limited to 'storage/connect/mycat.cc')
-rw-r--r-- | storage/connect/mycat.cc | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc index bb77512be62..230c0a4aa6f 100644 --- a/storage/connect/mycat.cc +++ b/storage/connect/mycat.cc @@ -94,9 +94,9 @@ #if defined(XML_SUPPORT) #include "tabxml.h" #endif // XML_SUPPORT -#if defined(JAVA_SUPPORT) +#if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT) #include "mongo.h" -#endif // JAVA_SUPPORT +#endif // JAVA_SUPPORT || CMGO_SUPPORT #if defined(ZIP_SUPPORT) #include "tabzip.h" #endif // ZIP_SUPPORT @@ -109,9 +109,10 @@ extern "C" HINSTANCE s_hModule; // Saved module handle #endif // !__WIN__ -#if defined(JAVA_SUPPORT) -//bool MongoEnabled(void); -#endif // JAVA_SUPPORT +#if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT) +bool MongoEnabled(void); +#endif // JAVA_SUPPORT || CMGO_SUPPORT + PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info); /***********************************************************************/ @@ -144,7 +145,9 @@ TABTYPE GetTypeID(const char *type) #endif #if defined(JAVA_SUPPORT) : (!stricmp(type, "JDBC")) ? TAB_JDBC - : (!stricmp(type, "MONGO")) ? TAB_MONGO +#endif +#if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT) + : (!stricmp(type, "MONGO") && MongoEnabled()) ? TAB_MONGO #endif : (!stricmp(type, "MYSQL")) ? TAB_MYSQL : (!stricmp(type, "MYPRX")) ? TAB_MYSQL @@ -488,7 +491,7 @@ void MYCAT::Reset(void) PRELDEF MYCAT::GetTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR type, PRELDEF *) { - if (trace) + if (trace(1)) printf("GetTableDesc: name=%s am=%s\n", tablep->GetName(), SVP(type)); // If not specified get the type of this table @@ -509,7 +512,7 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) LPCSTR schema = (PSZ)PlugDup(g, tablep->GetSchema()); PRELDEF tdp= NULL; - if (trace) + if (trace(1)) printf("MakeTableDesc: name=%s schema=%s am=%s\n", name, SVP(schema), SVP(am)); @@ -552,18 +555,17 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) case TAB_PIVOT: tdp= new(g) PIVOTDEF; break; case TAB_VIR: tdp= new(g) VIRDEF; break; case TAB_JSON: tdp= new(g) JSONDEF; break; -#if defined(MONGO_SUPPORT) - case TAB_MONGO: -// if (MongoEnabled()) - tdp = new(g) MGODEF; -// else -// strcpy(g->Message, "MONGO type not enabled"); - - break; -#endif // MONGO_SUPPORT #if defined(ZIP_SUPPORT) - case TAB_ZIP: tdp= new(g) ZIPDEF; break; + case TAB_ZIP: tdp = new(g) ZIPDEF; break; #endif // ZIP_SUPPORT +#if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT) + case TAB_MONGO: + if (MongoEnabled()) { + tdp = new(g) MGODEF; + break; + } // endif enabled + // fall through +#endif // JAVA_SUPPORT || CMGO_SUPPORT default: sprintf(g->Message, MSG(BAD_TABLE_TYPE), am, name); } // endswitch @@ -584,14 +586,14 @@ PTDB MYCAT::GetTable(PGLOBAL g, PTABLE tablep, MODE mode, LPCSTR type) PTDB tdbp= NULL; // LPCSTR name= tablep->GetName(); - if (trace) + if (trace(1)) printf("GetTableDB: name=%s\n", tablep->GetName()); // Look for the description of the requested table tdp= GetTableDesc(g, tablep, type); if (tdp) { - if (trace) + if (trace(1)) printf("tdb=%p type=%s\n", tdp, tdp->GetType()); if (tablep->GetSchema()) @@ -601,7 +603,7 @@ PTDB MYCAT::GetTable(PGLOBAL g, PTABLE tablep, MODE mode, LPCSTR type) } // endif tdp if (tdbp) { - if (trace) + if (trace(1)) printf("tdbp=%p name=%s amtype=%d\n", tdbp, tdbp->GetName(), tdbp->GetAmType()); tablep->SetTo_Tdb(tdbp); |