Skip to content

Commit 36b2dec

Browse files
committed
- 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
1 parent 96252b6 commit 36b2dec

15 files changed

+23
-16
lines changed

storage/connect/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ IF(CONNECT_WITH_JDBC)
270270
jmgfam.cpp jmgoconn.cpp mongo.cpp tabjmg.cpp
271271
jmgfam.h jmgoconn.h mongo.h tabjmg.h
272272
Mongo2Interface.java Mongo3Interface.java)
273-
add_definitions(-DMONGO_SUPPORT)
273+
add_definitions(-DMONGO_SUPPORT -DMONGO_ENABLED=1)
274274
ENDIF()
275275
ELSE()
276276
SET(JDBC_LIBRARY "")

storage/connect/array.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ ARRAY::ARRAY(PGLOBAL g, int type, int size, int length, int prec)
155155
switch (type) {
156156
case TYPE_STRING:
157157
Len = length;
158+
/* fall through */
158159
case TYPE_SHORT:
159160
case TYPE_INT:
160161
case TYPE_DOUBLE:
@@ -592,6 +593,7 @@ int ARRAY::Convert(PGLOBAL g, int k, PVAL vp)
592593
switch (Type) {
593594
case TYPE_DOUBLE:
594595
prec = 2;
596+
/* fall through */
595597
case TYPE_SHORT:
596598
case TYPE_INT:
597599
case TYPE_DATE:

storage/connect/filamdbf.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,8 @@ bool DBFFAM::OpenTableFile(PGLOBAL g)
503503
break;
504504
} // endif
505505

506-
// Selective delete, pass thru
506+
// Selective delete
507+
/* fall through */
507508
case MODE_UPDATE:
508509
UseTemp = Tdbp->IsUsingTemp(g);
509510
strcpy(opmode, (UseTemp) ? "rb" : "r+b");
@@ -623,6 +624,7 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g)
623624
case 'L': // Large (big) integer
624625
case 'T': // Tiny integer
625626
c = 'N'; // Numeric
627+
/* fall through */
626628
case 'N': // Numeric (integer)
627629
case 'F': // Float (double)
628630
descp->Decimals = (uchar)cdp->F.Prec;

storage/connect/filamfix.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,8 @@ bool BGXFAM::OpenTableFile(PGLOBAL g)
920920
break;
921921
} // endif
922922

923-
// Selective delete, pass thru
923+
// Selective delete
924+
/* fall through */
924925
case MODE_UPDATE:
925926
UseTemp = Tdbp->IsUsingTemp(g);
926927
oflag |= (UseTemp) ? O_RDONLY : O_RDWR;

storage/connect/filamtxt.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ bool DOSFAM::OpenTableFile(PGLOBAL g)
574574

575575
// Selective delete, pass thru
576576
Bin = true;
577+
/* fall through */
577578
case MODE_UPDATE:
578579
if ((UseTemp = Tdbp->IsUsingTemp(g))) {
579580
strcpy(opmode, "r");

storage/connect/filamvct.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ bool VCTFAM::OpenTableFile(PGLOBAL g)
440440
} // endif
441441

442442
// Selective delete, pass thru
443+
/* fall through */
443444
case MODE_UPDATE:
444445
UseTemp = Tdbp->IsUsingTemp(g);
445446
strcpy(opmode, (UseTemp) ? "rb" : "r+b");
@@ -1918,6 +1919,7 @@ bool VECFAM::OpenTableFile(PGLOBAL g)
19181919
} // endif filter
19191920

19201921
// Selective delete, pass thru
1922+
/* fall through */
19211923
case MODE_UPDATE:
19221924
UseTemp = Tdbp->IsUsingTemp(g);
19231925
strcpy(opmode, (UseTemp) ? "rb": "r+b");
@@ -3585,6 +3587,7 @@ bool BGVFAM::OpenTableFile(PGLOBAL g)
35853587
} // endif
35863588

35873589
// Selective delete, pass thru
3590+
/* fall through */
35883591
case MODE_UPDATE:
35893592
UseTemp = Tdbp->IsUsingTemp(g);
35903593
oflag = (UseTemp) ? O_RDONLY : O_RDWR;

storage/connect/filamzip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ bool ZIPUTIL::OpenTable(PGLOBAL g, MODE mode, PCSZ fn, bool append)
344344
bool ZIPUTIL::addEntry(PGLOBAL g, PCSZ entry)
345345
{
346346
//?? we dont need the stinking time
347-
zip_fileinfo zi = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
347+
zip_fileinfo zi = { {0, 0, 0, 0, 0, 0}, 0, 0, 0 };
348348

349349
getTime(zi.tmz_date);
350350
target = entry;

storage/connect/filter.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ bool FILTER::Convert(PGLOBAL g, bool having)
11931193
Arg(0) = pXVOID;
11941194
} // endif void
11951195

1196-
// pass thru
1196+
// fall through
11971197
case OP_IN:
11981198
// For IN operator do optimize if operand is an array
11991199
if (GetArgType(1) != TYPE_ARRAY)
@@ -1260,6 +1260,7 @@ bool FILTER::Eval(PGLOBAL g)
12601260
} // endif Opm
12611261

12621262
// For modified operators, pass thru
1263+
/* fall through */
12631264
case OP_IN:
12641265
case OP_EXIST:
12651266
// For IN operations, special processing is done here
@@ -1798,8 +1799,6 @@ PFIL PrepareFilter(PGLOBAL g, PFIL fp, bool having)
17981799

17991800
if (trace)
18001801
htrc(" returning filp=%p\n", filp);
1801-
//if (filp)
1802-
// filp->Print(g, debug, 0);
18031802

18041803
return filp;
18051804
} // end of PrepareFilter

storage/connect/ha_connect.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,7 @@ extern "C" {
182182

183183
#if defined(NEW_MAR)
184184
#define stored_in_db stored_in_db()
185-
#define MONGO_ENABLED 1
186-
#else // !NEW_MAR
187-
#define MONGO_ENABLED 0
188-
#endif // !NEW_MAR)
185+
#endif // NEW_MAR)
189186

190187
#if defined(XMAP)
191188
my_bool xmap= false;

storage/connect/jsonudf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ PVAL JSNX::CalculateArray(PGLOBAL g, PJAR arp, int n)
537537
SetJsonValue(g, MulVal, jvp, n);
538538

539539
if (!MulVal->IsNull()) {
540-
switch (op) {
540+
switch (op) {
541541
case OP_CNC:
542542
if (Nodes[n].CncVal) {
543543
val[0] = Nodes[n].CncVal;

0 commit comments

Comments
 (0)