Commit 36b2dec1 authored by Olivier Bertrand's avatar Olivier Bertrand

- 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
parent 96252b6a
...@@ -270,7 +270,7 @@ IF(CONNECT_WITH_JDBC) ...@@ -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 "")
......
...@@ -155,6 +155,7 @@ ARRAY::ARRAY(PGLOBAL g, int type, int size, int length, int prec) ...@@ -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) ...@@ -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:
......
...@@ -503,7 +503,8 @@ bool DBFFAM::OpenTableFile(PGLOBAL g) ...@@ -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) ...@@ -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;
......
...@@ -920,7 +920,8 @@ bool BGXFAM::OpenTableFile(PGLOBAL g) ...@@ -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;
......
...@@ -574,6 +574,7 @@ bool DOSFAM::OpenTableFile(PGLOBAL g) ...@@ -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");
......
...@@ -440,6 +440,7 @@ bool VCTFAM::OpenTableFile(PGLOBAL g) ...@@ -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) ...@@ -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) ...@@ -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;
......
...@@ -344,7 +344,7 @@ bool ZIPUTIL::OpenTable(PGLOBAL g, MODE mode, PCSZ fn, bool append) ...@@ -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;
......
...@@ -1193,7 +1193,7 @@ bool FILTER::Convert(PGLOBAL g, bool having) ...@@ -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) ...@@ -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) ...@@ -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
......
...@@ -182,10 +182,7 @@ extern "C" { ...@@ -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;
......
...@@ -537,7 +537,7 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n) ...@@ -537,7 +537,7 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n)
SetJsonValue(g, MulVal, jvp, n); SetJsonValue(g, MulVal, jvp, n);
if (!MulVal->IsNull()) { if (!MulVal->IsNull()) {
switch (op) { switch (op) {
case OP_CNC: case OP_CNC:
if (Nodes[n].CncVal) { if (Nodes[n].CncVal) {
val[0] = Nodes[n].CncVal; val[0] = Nodes[n].CncVal;
......
...@@ -95,7 +95,7 @@ extern pthread_mutex_t parmut; ...@@ -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) ...@@ -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))
......
...@@ -129,6 +129,7 @@ int RELDEF::GetSizeCatInfo(PCSZ what, PCSZ sdef) ...@@ -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
......
...@@ -1311,6 +1311,7 @@ PBF TDBDOS::InitBlockFilter(PGLOBAL g, PFIL filp) ...@@ -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) {
......
...@@ -1810,7 +1810,7 @@ void JSONCOL::WriteColumn(PGLOBAL g) ...@@ -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:
......
...@@ -408,7 +408,7 @@ bool STRING::Append_quoted(PCSZ s) ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment