diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2017-05-23 19:35:50 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2017-05-23 19:35:50 +0200 |
commit | 3e36eb230b65d53acc8e02b00a024e72ed249425 (patch) | |
tree | be89d99353fc70488a5b43707fac12b960f2f29b /storage/connect/mycat.cc | |
parent | e8333389c89c946d3794ec9ea708d308318301a3 (diff) | |
download | mariadb-git-3e36eb230b65d53acc8e02b00a024e72ed249425.tar.gz |
Fix gcc compiler warnings reported by Sergei
modified: storage/connect/array.cpp
modified: storage/connect/array.h
modified: storage/connect/blkfil.cpp
modified: storage/connect/blkfil.h
modified: storage/connect/block.h
modified: storage/connect/colblk.cpp
modified: storage/connect/colblk.h
modified: storage/connect/csort.h
modified: storage/connect/filamvct.cpp
modified: storage/connect/filter.cpp
modified: storage/connect/filter.h
modified: storage/connect/global.h
modified: storage/connect/json.h
modified: storage/connect/plgdbsem.h
modified: storage/connect/plgdbutl.cpp
modified: storage/connect/tabcol.cpp
modified: storage/connect/tabcol.h
modified: storage/connect/tabdos.cpp
modified: storage/connect/tabdos.h
modified: storage/connect/tabjson.cpp
modified: storage/connect/table.cpp
modified: storage/connect/tabodbc.cpp
modified: storage/connect/tabodbc.h
modified: storage/connect/tabsys.h
modified: storage/connect/tabxml.h
modified: storage/connect/value.cpp
modified: storage/connect/value.h
modified: storage/connect/xindex.cpp
modified: storage/connect/xindex.h
modified: storage/connect/xobject.cpp
modified: storage/connect/xobject.h
modified: storage/connect/xtable.h
Set values as nullable when retrieving catalog info
modified: storage/connect/jdbconn.cpp
modified: storage/connect/mysql-test/connect/r/odbc_oracle.result
modified: storage/connect/odbconn.cpp
Change format of Jpath
modified: storage/connect/json.cpp
modified: storage/connect/jsonudf.cpp
modified: storage/connect/mysql-test/connect/r/json.result
modified: storage/connect/mysql-test/connect/r/json_udf.result
modified: storage/connect/mysql-test/connect/r/json_udf_bin.result
modified: storage/connect/mysql-test/connect/r/zip.result
modified: storage/connect/mysql-test/connect/t/json.test
modified: storage/connect/mysql-test/connect/t/json_udf.test
modified: storage/connect/mysql-test/connect/t/json_udf_bin.test
modified: storage/connect/mysql-test/connect/t/zip.test
modified: storage/connect/tabjson.cpp
modified: storage/connect/tabjson.h
modified: storage/connect/tabmgo.cpp
Change null representation from ??? to <null>
modified: storage/connect/json.cpp
Change the name of UDF that are equal to a native JSON function name
modified: storage/connect/jsonudf.cpp
modified: storage/connect/jsonudf.h
modified: storage/connect/mysql-test/connect/t/json_udf.inc
modified: storage/connect/mysql-test/connect/t/json_udf2.inc
Fix bug in making JSON project info
modified: storage/connect/mongofam.cpp
Fix COMPUTE when one argument is null
modified: storage/connect/value.cpp
Value is null only when nullable
modified: storage/connect/value.h
Diffstat (limited to 'storage/connect/mycat.cc')
-rw-r--r-- | storage/connect/mycat.cc | 45 |
1 files changed, 11 insertions, 34 deletions
diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc index 1fcd8ac78da..0104213ed92 100644 --- a/storage/connect/mycat.cc +++ b/storage/connect/mycat.cc @@ -96,6 +96,9 @@ #if defined(XML_SUPPORT) #include "tabxml.h" #endif // XML_SUPPORT +#if defined(MONGO_SUPPORT) +#include "tabmgo.h" +#endif // MONGO_SUPPORT #if defined(ZIP_SUPPORT) #include "tabzip.h" #endif // ZIP_SUPPORT @@ -161,7 +164,10 @@ TABTYPE GetTypeID(const char *type) #ifdef ZIP_SUPPORT : (!stricmp(type, "ZIP")) ? TAB_ZIP #endif - : (!stricmp(type, "OEM")) ? TAB_OEM : TAB_NIY; +#ifdef MONGO_SUPPORT + : (!stricmp(type, "MONGO")) ? TAB_MONGO +#endif + : (!stricmp(type, "OEM")) ? TAB_OEM : TAB_NIY; } // end of GetTypeID /***********************************************************************/ @@ -307,6 +313,7 @@ int GetIndexType(TABTYPE type) case TAB_MYSQL: case TAB_ODBC: case TAB_JDBC: + case TAB_MONGO: xtyp= 2; break; case TAB_VIR: @@ -477,39 +484,6 @@ void MYCAT::Reset(void) { } // end of Reset -#if 0 -/***********************************************************************/ -/* This function sets the current database path. */ -/***********************************************************************/ -void MYCAT::SetPath(PGLOBAL g, LPCSTR *datapath, const char *path) - { - if (path) { - size_t len= strlen(path) + (*path != '.' ? 4 : 1); - char *buf= (char*)PlugSubAlloc(g, NULL, len); - - if (PlugIsAbsolutePath(path)) - { - strcpy(buf, path); - *datapath= buf; - return; - } - - if (*path != '.') { -#if defined(__WIN__) - char *s= "\\"; -#else // !__WIN__ - char *s= "/"; -#endif // !__WIN__ - strcat(strcat(strcat(strcpy(buf, "."), s), path), s); - } else - strcpy(buf, path); - - *datapath= buf; - } // endif path - - } // end of SetDataPath -#endif // 0 - /***********************************************************************/ /* GetTableDesc: retrieve a table descriptor. */ /* Look for a table descriptor matching the name and type. */ @@ -583,6 +557,9 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am) #endif // PIVOT_SUPPORT case TAB_VIR: tdp= new(g) VIRDEF; break; case TAB_JSON: tdp= new(g) JSONDEF; break; +#if defined(MONGO_SUPPORT) + case TAB_MONGO: tdp = new(g) MGODEF; break; +#endif // MONGO_SUPPORT #if defined(ZIP_SUPPORT) case TAB_ZIP: tdp= new(g) ZIPDEF; break; #endif // ZIP_SUPPORT |