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

- Set MONGO_ENABLED

modified:   storage/connect/CMakeLists.txt

- Avoid gcc warnings for "fall through"
  modified:   storage/connect/array.cpp
  modified:   storage/connect/filamdbf.cpp
  modified:   storage/connect/filamfix.cpp
  modified:   storage/connect/filamtxt.cpp
  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/filamzip.cpp
  modified:   storage/connect/filter.cpp
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/xobject.cpp
This commit is contained in:
Olivier Bertrand
2017-08-31 01:22:50 +02:00
parent 96252b6abd
commit 36b2dec114
15 changed files with 23 additions and 16 deletions

View File

@@ -270,7 +270,7 @@ IF(CONNECT_WITH_JDBC)
jmgfam.cpp jmgoconn.cpp mongo.cpp tabjmg.cpp jmgfam.cpp jmgoconn.cpp mongo.cpp tabjmg.cpp
jmgfam.h jmgoconn.h mongo.h tabjmg.h jmgfam.h jmgoconn.h mongo.h tabjmg.h
Mongo2Interface.java Mongo3Interface.java) Mongo2Interface.java Mongo3Interface.java)
add_definitions(-DMONGO_SUPPORT) add_definitions(-DMONGO_SUPPORT -DMONGO_ENABLED=1)
ENDIF() ENDIF()
ELSE() ELSE()
SET(JDBC_LIBRARY "") SET(JDBC_LIBRARY "")

View File

@@ -155,6 +155,7 @@ ARRAY::ARRAY(PGLOBAL g, int type, int size, int length, int prec)
switch (type) { switch (type) {
case TYPE_STRING: case TYPE_STRING:
Len = length; Len = length;
/* fall through */
case TYPE_SHORT: case TYPE_SHORT:
case TYPE_INT: case TYPE_INT:
case TYPE_DOUBLE: case TYPE_DOUBLE:
@@ -592,6 +593,7 @@ int ARRAY::Convert(PGLOBAL g, int k, PVAL vp)
switch (Type) { switch (Type) {
case TYPE_DOUBLE: case TYPE_DOUBLE:
prec = 2; prec = 2;
/* fall through */
case TYPE_SHORT: case TYPE_SHORT:
case TYPE_INT: case TYPE_INT:
case TYPE_DATE: case TYPE_DATE:

View File

@@ -503,7 +503,8 @@ bool DBFFAM::OpenTableFile(PGLOBAL g)
break; break;
} // endif } // endif
// Selective delete, pass thru // Selective delete
/* fall through */
case MODE_UPDATE: case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g); UseTemp = Tdbp->IsUsingTemp(g);
strcpy(opmode, (UseTemp) ? "rb" : "r+b"); strcpy(opmode, (UseTemp) ? "rb" : "r+b");
@@ -623,6 +624,7 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g)
case 'L': // Large (big) integer case 'L': // Large (big) integer
case 'T': // Tiny integer case 'T': // Tiny integer
c = 'N'; // Numeric c = 'N'; // Numeric
/* fall through */
case 'N': // Numeric (integer) case 'N': // Numeric (integer)
case 'F': // Float (double) case 'F': // Float (double)
descp->Decimals = (uchar)cdp->F.Prec; descp->Decimals = (uchar)cdp->F.Prec;

View File

@@ -920,7 +920,8 @@ bool BGXFAM::OpenTableFile(PGLOBAL g)
break; break;
} // endif } // endif
// Selective delete, pass thru // Selective delete
/* fall through */
case MODE_UPDATE: case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g); UseTemp = Tdbp->IsUsingTemp(g);
oflag |= (UseTemp) ? O_RDONLY : O_RDWR; oflag |= (UseTemp) ? O_RDONLY : O_RDWR;

View File

@@ -574,6 +574,7 @@ bool DOSFAM::OpenTableFile(PGLOBAL g)
// Selective delete, pass thru // Selective delete, pass thru
Bin = true; Bin = true;
/* fall through */
case MODE_UPDATE: case MODE_UPDATE:
if ((UseTemp = Tdbp->IsUsingTemp(g))) { if ((UseTemp = Tdbp->IsUsingTemp(g))) {
strcpy(opmode, "r"); strcpy(opmode, "r");

View File

@@ -440,6 +440,7 @@ bool VCTFAM::OpenTableFile(PGLOBAL g)
} // endif } // endif
// Selective delete, pass thru // Selective delete, pass thru
/* fall through */
case MODE_UPDATE: case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g); UseTemp = Tdbp->IsUsingTemp(g);
strcpy(opmode, (UseTemp) ? "rb" : "r+b"); strcpy(opmode, (UseTemp) ? "rb" : "r+b");
@@ -1918,6 +1919,7 @@ bool VECFAM::OpenTableFile(PGLOBAL g)
} // endif filter } // endif filter
// Selective delete, pass thru // Selective delete, pass thru
/* fall through */
case MODE_UPDATE: case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g); UseTemp = Tdbp->IsUsingTemp(g);
strcpy(opmode, (UseTemp) ? "rb": "r+b"); strcpy(opmode, (UseTemp) ? "rb": "r+b");
@@ -3585,6 +3587,7 @@ bool BGVFAM::OpenTableFile(PGLOBAL g)
} // endif } // endif
// Selective delete, pass thru // Selective delete, pass thru
/* fall through */
case MODE_UPDATE: case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g); UseTemp = Tdbp->IsUsingTemp(g);
oflag = (UseTemp) ? O_RDONLY : O_RDWR; oflag = (UseTemp) ? O_RDONLY : O_RDWR;

View File

@@ -344,7 +344,7 @@ bool ZIPUTIL::OpenTable(PGLOBAL g, MODE mode, PCSZ fn, bool append)
bool ZIPUTIL::addEntry(PGLOBAL g, PCSZ entry) bool ZIPUTIL::addEntry(PGLOBAL g, PCSZ entry)
{ {
//?? we dont need the stinking time //?? we dont need the stinking time
zip_fileinfo zi = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; zip_fileinfo zi = { {0, 0, 0, 0, 0, 0}, 0, 0, 0 };
getTime(zi.tmz_date); getTime(zi.tmz_date);
target = entry; target = entry;

View File

@@ -1193,7 +1193,7 @@ bool FILTER::Convert(PGLOBAL g, bool having)
Arg(0) = pXVOID; Arg(0) = pXVOID;
} // endif void } // endif void
// pass thru // fall through
case OP_IN: case OP_IN:
// For IN operator do optimize if operand is an array // For IN operator do optimize if operand is an array
if (GetArgType(1) != TYPE_ARRAY) if (GetArgType(1) != TYPE_ARRAY)
@@ -1260,6 +1260,7 @@ bool FILTER::Eval(PGLOBAL g)
} // endif Opm } // endif Opm
// For modified operators, pass thru // For modified operators, pass thru
/* fall through */
case OP_IN: case OP_IN:
case OP_EXIST: case OP_EXIST:
// For IN operations, special processing is done here // For IN operations, special processing is done here
@@ -1798,8 +1799,6 @@ PFIL PrepareFilter(PGLOBAL g, PFIL fp, bool having)
if (trace) if (trace)
htrc(" returning filp=%p\n", filp); htrc(" returning filp=%p\n", filp);
//if (filp)
// filp->Print(g, debug, 0);
return filp; return filp;
} // end of PrepareFilter } // end of PrepareFilter

View File

@@ -182,10 +182,7 @@ extern "C" {
#if defined(NEW_MAR) #if defined(NEW_MAR)
#define stored_in_db stored_in_db() #define stored_in_db stored_in_db()
#define MONGO_ENABLED 1 #endif // NEW_MAR)
#else // !NEW_MAR
#define MONGO_ENABLED 0
#endif // !NEW_MAR)
#if defined(XMAP) #if defined(XMAP)
my_bool xmap= false; my_bool xmap= false;

View File

@@ -95,7 +95,7 @@ extern pthread_mutex_t parmut;
//#endif // !__WIN__ //#endif // !__WIN__
// The debug trace used by the main thread // The debug trace used by the main thread
FILE *pfile = NULL; FILE *pfile = NULL;
MBLOCK Nmblk = {NULL, false, 0, false, NULL}; // Used to init MBLOCK's MBLOCK Nmblk = {NULL, false, 0, false, NULL}; // Used to init MBLOCK's
@@ -912,7 +912,7 @@ int PlugCloseFile(PGLOBAL g, PFBLOCK fp, bool all)
fp->Memory = NULL; fp->Memory = NULL;
fp->Mode = MODE_ANY; fp->Mode = MODE_ANY;
// Passthru // fall through
case TYPE_FB_HANDLE: case TYPE_FB_HANDLE:
if (fp->Handle && fp->Handle != INVALID_HANDLE_VALUE) if (fp->Handle && fp->Handle != INVALID_HANDLE_VALUE)
if (CloseFileHandle(fp->Handle)) if (CloseFileHandle(fp->Handle))

View File

@@ -129,6 +129,7 @@ int RELDEF::GetSizeCatInfo(PCSZ what, PCSZ sdef)
switch (toupper(c)) { switch (toupper(c)) {
case 'M': case 'M':
n *= 1024; n *= 1024;
// fall through
case 'K': case 'K':
n *= 1024; n *= 1024;
} // endswitch c } // endswitch c

View File

@@ -1311,6 +1311,7 @@ PBF TDBDOS::InitBlockFilter(PGLOBAL g, PFIL filp)
} // endif !opm } // endif !opm
// if opm, pass thru // if opm, pass thru
// fall through
case OP_IN: case OP_IN:
if (filp->GetArgType(0) == TYPE_COLBLK && if (filp->GetArgType(0) == TYPE_COLBLK &&
filp->GetArgType(1) == TYPE_ARRAY) { filp->GetArgType(1) == TYPE_ARRAY) {

View File

@@ -1810,7 +1810,7 @@ void JSONCOL::WriteColumn(PGLOBAL g)
break; break;
} // endif Op } // endif Op
// Passthru // fall through
case TYPE_DATE: case TYPE_DATE:
case TYPE_INT: case TYPE_INT:
case TYPE_TINY: case TYPE_TINY:

View File

@@ -408,7 +408,7 @@ bool STRING::Append_quoted(PCSZ s)
case '\r': case '\r':
case '\b': case '\b':
case '\f': b |= Append('\\'); case '\f': b |= Append('\\');
// passthru // fall through
default: default:
b |= Append(*p); b |= Append(*p);
break; break;