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)
jmgfam.cpp jmgoconn.cpp mongo.cpp tabjmg.cpp
jmgfam.h jmgoconn.h mongo.h tabjmg.h
Mongo2Interface.java Mongo3Interface.java)
add_definitions(-DMONGO_SUPPORT)
add_definitions(-DMONGO_SUPPORT -DMONGO_ENABLED=1)
ENDIF()
ELSE()
SET(JDBC_LIBRARY "")
......
......@@ -155,6 +155,7 @@ ARRAY::ARRAY(PGLOBAL g, int type, int size, int length, int prec)
switch (type) {
case TYPE_STRING:
Len = length;
/* fall through */
case TYPE_SHORT:
case TYPE_INT:
case TYPE_DOUBLE:
......@@ -592,6 +593,7 @@ int ARRAY::Convert(PGLOBAL g, int k, PVAL vp)
switch (Type) {
case TYPE_DOUBLE:
prec = 2;
/* fall through */
case TYPE_SHORT:
case TYPE_INT:
case TYPE_DATE:
......
......@@ -503,7 +503,8 @@ bool DBFFAM::OpenTableFile(PGLOBAL g)
break;
} // endif
// Selective delete, pass thru
// Selective delete
/* fall through */
case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g);
strcpy(opmode, (UseTemp) ? "rb" : "r+b");
......@@ -623,6 +624,7 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g)
case 'L': // Large (big) integer
case 'T': // Tiny integer
c = 'N'; // Numeric
/* fall through */
case 'N': // Numeric (integer)
case 'F': // Float (double)
descp->Decimals = (uchar)cdp->F.Prec;
......
......@@ -920,7 +920,8 @@ bool BGXFAM::OpenTableFile(PGLOBAL g)
break;
} // endif
// Selective delete, pass thru
// Selective delete
/* fall through */
case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g);
oflag |= (UseTemp) ? O_RDONLY : O_RDWR;
......
......@@ -574,6 +574,7 @@ bool DOSFAM::OpenTableFile(PGLOBAL g)
// Selective delete, pass thru
Bin = true;
/* fall through */
case MODE_UPDATE:
if ((UseTemp = Tdbp->IsUsingTemp(g))) {
strcpy(opmode, "r");
......
......@@ -440,6 +440,7 @@ bool VCTFAM::OpenTableFile(PGLOBAL g)
} // endif
// Selective delete, pass thru
/* fall through */
case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g);
strcpy(opmode, (UseTemp) ? "rb" : "r+b");
......@@ -1918,6 +1919,7 @@ bool VECFAM::OpenTableFile(PGLOBAL g)
} // endif filter
// Selective delete, pass thru
/* fall through */
case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g);
strcpy(opmode, (UseTemp) ? "rb": "r+b");
......@@ -3585,6 +3587,7 @@ bool BGVFAM::OpenTableFile(PGLOBAL g)
} // endif
// Selective delete, pass thru
/* fall through */
case MODE_UPDATE:
UseTemp = Tdbp->IsUsingTemp(g);
oflag = (UseTemp) ? O_RDONLY : O_RDWR;
......
......@@ -344,7 +344,7 @@ bool ZIPUTIL::OpenTable(PGLOBAL g, MODE mode, PCSZ fn, bool append)
bool ZIPUTIL::addEntry(PGLOBAL g, PCSZ entry)
{
//?? 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);
target = entry;
......
......@@ -1193,7 +1193,7 @@ bool FILTER::Convert(PGLOBAL g, bool having)
Arg(0) = pXVOID;
} // endif void
// pass thru
// fall through
case OP_IN:
// For IN operator do optimize if operand is an array
if (GetArgType(1) != TYPE_ARRAY)
......@@ -1260,6 +1260,7 @@ bool FILTER::Eval(PGLOBAL g)
} // endif Opm
// For modified operators, pass thru
/* fall through */
case OP_IN:
case OP_EXIST:
// For IN operations, special processing is done here
......@@ -1798,8 +1799,6 @@ PFIL PrepareFilter(PGLOBAL g, PFIL fp, bool having)
if (trace)
htrc(" returning filp=%p\n", filp);
//if (filp)
// filp->Print(g, debug, 0);
return filp;
} // end of PrepareFilter
......
......@@ -182,10 +182,7 @@ extern "C" {
#if defined(NEW_MAR)
#define stored_in_db stored_in_db()
#define MONGO_ENABLED 1
#else // !NEW_MAR
#define MONGO_ENABLED 0
#endif // !NEW_MAR)
#endif // NEW_MAR)
#if defined(XMAP)
my_bool xmap= false;
......
......@@ -537,7 +537,7 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n)
SetJsonValue(g, MulVal, jvp, n);
if (!MulVal->IsNull()) {
switch (op) {
switch (op) {
case OP_CNC:
if (Nodes[n].CncVal) {
val[0] = Nodes[n].CncVal;
......
......@@ -95,7 +95,7 @@ extern pthread_mutex_t parmut;
//#endif // !__WIN__
// 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
......@@ -912,7 +912,7 @@ int PlugCloseFile(PGLOBAL g, PFBLOCK fp, bool all)
fp->Memory = NULL;
fp->Mode = MODE_ANY;
// Passthru
// fall through
case TYPE_FB_HANDLE:
if (fp->Handle && fp->Handle != INVALID_HANDLE_VALUE)
if (CloseFileHandle(fp->Handle))
......
......@@ -129,6 +129,7 @@ int RELDEF::GetSizeCatInfo(PCSZ what, PCSZ sdef)
switch (toupper(c)) {
case 'M':
n *= 1024;
// fall through
case 'K':
n *= 1024;
} // endswitch c
......
......@@ -1311,6 +1311,7 @@ PBF TDBDOS::InitBlockFilter(PGLOBAL g, PFIL filp)
} // endif !opm
// if opm, pass thru
// fall through
case OP_IN:
if (filp->GetArgType(0) == TYPE_COLBLK &&
filp->GetArgType(1) == TYPE_ARRAY) {
......
......@@ -1810,7 +1810,7 @@ void JSONCOL::WriteColumn(PGLOBAL g)
break;
} // endif Op
// Passthru
// fall through
case TYPE_DATE:
case TYPE_INT:
case TYPE_TINY:
......
......@@ -408,7 +408,7 @@ bool STRING::Append_quoted(PCSZ s)
case '\r':
case '\b':
case '\f': b |= Append('\\');
// passthru
// fall through
default:
b |= Append(*p);
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