summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2017-08-31 01:26:45 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2017-08-31 01:26:45 +0200
commitf6103105c048044c91fa79d2406fb5cb99c45737 (patch)
tree6bbc1510d82990e910014adf3c7906eeb5e7f540 /storage/connect
parent5c42d86aff92b14d7c11b3a83f06fbb6776dc083 (diff)
parent01209de7637a7206c18788e08919b5ccf0b3d700 (diff)
downloadmariadb-git-f6103105c048044c91fa79d2406fb5cb99c45737.tar.gz
Merging from MariaDB repository
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/CMakeLists.txt6
-rw-r--r--storage/connect/array.cpp2
-rw-r--r--storage/connect/filamdbf.cpp4
-rw-r--r--storage/connect/filamfix.cpp3
-rw-r--r--storage/connect/filamtxt.cpp1
-rwxr-xr-xstorage/connect/filamvct.cpp3
-rw-r--r--storage/connect/filamzip.cpp2
-rw-r--r--storage/connect/filter.cpp5
-rw-r--r--storage/connect/ha_connect.cc7
-rw-r--r--storage/connect/jsonudf.cpp2
-rw-r--r--storage/connect/plgdbutl.cpp4
-rw-r--r--storage/connect/reldef.cpp1
-rw-r--r--storage/connect/tabdos.cpp1
-rw-r--r--storage/connect/tabext.h2
-rw-r--r--storage/connect/tabjson.cpp2
-rw-r--r--storage/connect/xobject.cpp2
16 files changed, 26 insertions, 21 deletions
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index de5a52e80ed..c265f4b703e 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -38,7 +38,7 @@ user_connect.h valblk.h value.h xindex.h xobject.h xtable.h)
# Definitions that are shared for all OSes
#
add_definitions( -DMARIADB -DFORCE_INIT_OF_VARS -Dconnect_EXPORTS)
-add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT -DPIVOT_SUPPORT )
+add_definitions( -DHUGE_SUPPORT -DGZ_SUPPORT -DPIVOT_SUPPORT -DUSE_TRY )
#
@@ -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=0)
ENDIF()
ELSE()
SET(JDBC_LIBRARY "")
@@ -369,5 +369,3 @@ IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND)
DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
ENDIF()
-
-
diff --git a/storage/connect/array.cpp b/storage/connect/array.cpp
index 285469462fa..639edf63a1a 100644
--- a/storage/connect/array.cpp
+++ b/storage/connect/array.cpp
@@ -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:
diff --git a/storage/connect/filamdbf.cpp b/storage/connect/filamdbf.cpp
index 8878f2c922b..44abd962c56 100644
--- a/storage/connect/filamdbf.cpp
+++ b/storage/connect/filamdbf.cpp
@@ -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;
diff --git a/storage/connect/filamfix.cpp b/storage/connect/filamfix.cpp
index 962a4516bf2..1d6194b154d 100644
--- a/storage/connect/filamfix.cpp
+++ b/storage/connect/filamfix.cpp
@@ -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;
diff --git a/storage/connect/filamtxt.cpp b/storage/connect/filamtxt.cpp
index 382af51aae4..c456ee9e9b7 100644
--- a/storage/connect/filamtxt.cpp
+++ b/storage/connect/filamtxt.cpp
@@ -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");
diff --git a/storage/connect/filamvct.cpp b/storage/connect/filamvct.cpp
index 62577009766..871613cb4b4 100755
--- a/storage/connect/filamvct.cpp
+++ b/storage/connect/filamvct.cpp
@@ -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;
diff --git a/storage/connect/filamzip.cpp b/storage/connect/filamzip.cpp
index c40c5fb1b47..dfd9343af76 100644
--- a/storage/connect/filamzip.cpp
+++ b/storage/connect/filamzip.cpp
@@ -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;
diff --git a/storage/connect/filter.cpp b/storage/connect/filter.cpp
index 2fd88b6674e..6a96240c469 100644
--- a/storage/connect/filter.cpp
+++ b/storage/connect/filter.cpp
@@ -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
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 6dd5131c238..4ccb0ac67b7 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -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;
@@ -4346,7 +4343,7 @@ bool ha_connect::check_privileges(THD *thd, PTOS options, char *dbn, bool quick)
} else
return false;
- /* Fall through to check FILE_ACL */
+ /* Fall through to check FILE_ACL */
case TAB_ODBC:
case TAB_JDBC:
case TAB_MYSQL:
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp
index 6acf18cd323..4f0978cb548 100644
--- a/storage/connect/jsonudf.cpp
+++ b/storage/connect/jsonudf.cpp
@@ -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;
diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp
index 0943ce9f222..25da3162516 100644
--- a/storage/connect/plgdbutl.cpp
+++ b/storage/connect/plgdbutl.cpp
@@ -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))
diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp
index 718da35c7ce..95069baf76e 100644
--- a/storage/connect/reldef.cpp
+++ b/storage/connect/reldef.cpp
@@ -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
diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp
index e192ef202a9..5b9667a6c84 100644
--- a/storage/connect/tabdos.cpp
+++ b/storage/connect/tabdos.cpp
@@ -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) {
diff --git a/storage/connect/tabext.h b/storage/connect/tabext.h
index be819937a1f..6b67c2ab5ed 100644
--- a/storage/connect/tabext.h
+++ b/storage/connect/tabext.h
@@ -7,7 +7,7 @@
/***********************************************************************/
#ifndef __TABEXT_H
-#define __TABEXTF_H
+#define __TABEXT_H
#include "reldef.h"
diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp
index 1b7ab8ca952..76a3d5e9988 100644
--- a/storage/connect/tabjson.cpp
+++ b/storage/connect/tabjson.cpp
@@ -1810,7 +1810,7 @@ void JSONCOL::WriteColumn(PGLOBAL g)
break;
} // endif Op
- // Passthru
+ // fall through
case TYPE_DATE:
case TYPE_INT:
case TYPE_TINY:
diff --git a/storage/connect/xobject.cpp b/storage/connect/xobject.cpp
index eca60561b92..02d3e974dcc 100644
--- a/storage/connect/xobject.cpp
+++ b/storage/connect/xobject.cpp
@@ -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;