summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-05-11 13:12:18 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-11 13:15:10 +0200
commitc9717dc0190731c656cce31fa6e39a3db123e3af (patch)
tree3db056a3f50e565294d127edb5339afb0a994749 /storage/connect
parent33721d91389759a917463a044fbd6f0b7654d629 (diff)
parent1d411a8a440922f0538c1be254d6f4396af453a1 (diff)
downloadmariadb-git-c9717dc0190731c656cce31fa6e39a3db123e3af.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/filamtxt.cpp2
-rw-r--r--storage/connect/ha_connect.cc7
-rw-r--r--storage/connect/jsonudf.cpp4
-rw-r--r--storage/connect/mycat.cc7
-rw-r--r--storage/connect/tabext.cpp2
-rw-r--r--storage/connect/tabjdbc.cpp2
-rw-r--r--storage/connect/tabjson.cpp14
7 files changed, 14 insertions, 24 deletions
diff --git a/storage/connect/filamtxt.cpp b/storage/connect/filamtxt.cpp
index 7c222eb3c80..490ca3a5fba 100644
--- a/storage/connect/filamtxt.cpp
+++ b/storage/connect/filamtxt.cpp
@@ -427,7 +427,7 @@ int TXTFAM::DeleteSortedRows(PGLOBAL g)
for (i = 0; i < Posar->GetNval(); i++) {
if ((irc = InitDelete(g, Posar->GetIntValue(ix[i]),
- Sosar->GetIntValue(ix[i])) == RC_FX))
+ Sosar->GetIntValue(ix[i]))) == RC_FX)
goto err;
// Now delete the sorted rows
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 65e2a38166b..68658e169a6 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -108,13 +108,8 @@
#define MYSQL_SERVER 1
#define DONT_DEFINE_VOID
#include <my_global.h>
-#include "sql_class.h"
-#include "create_options.h"
-#include "mysql_com.h"
-#include "field.h"
#include "sql_parse.h"
#include "sql_base.h"
-#include <sys/stat.h>
#include "sql_partition.h"
#undef OFFSET
@@ -5571,7 +5566,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
} // endif p
} else if (ttp != TAB_ODBC || !(fnc & (FNC_TABLE | FNC_COL)))
- tab = (char *) table_s->table_name.str; // Default value
+ tab = (char*)table_s->table_name.str; // Default value
} // endif tab
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp
index ca51712af0c..3cc541c608f 100644
--- a/storage/connect/jsonudf.cpp
+++ b/storage/connect/jsonudf.cpp
@@ -41,8 +41,6 @@ static PJSON JsonNew(PGLOBAL g, JTYP type);
static PJVAL JvalNew(PGLOBAL g, JTYP type, void *vp = NULL);
static PJSNX JsnxNew(PGLOBAL g, PJSON jsp, int type, int len = 64);
-void json_array_deinit(UDF_INIT* initid);
-
static uint JsonGrpSize = 10;
/*********************************************************************************/
@@ -1622,7 +1620,7 @@ static my_bool CheckMemory(PGLOBAL g, UDF_INIT *initid, UDF_ARGS *args, uint n,
if (AllocSarea(g, ml)) {
char errmsg[MAX_STR];
- snprintf(errmsg, sizeof(errmsg)-1, MSG(WORK_AREA), g->Message);
+ snprintf(errmsg, sizeof(errmsg) - 1, MSG(WORK_AREA), g->Message);
strcpy(g->Message, errmsg);
return true;
} // endif SareaAlloc
diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc
index dd04d667e58..5aef6d9c660 100644
--- a/storage/connect/mycat.cc
+++ b/storage/connect/mycat.cc
@@ -18,7 +18,7 @@
/* ------------- */
/* Version 1.6 */
/* */
-/* Author: Olivier Bertrand 2012 - 2017 */
+/* Author: Olivier Bertrand 2012 - 2018 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
@@ -31,10 +31,7 @@
#define DONT_DEFINE_VOID
#include <my_global.h>
-#if defined(__WIN__)
-//#include <windows.h>
-//#include <sqlext.h>
-#elif defined(UNIX)
+#if defined(UNIX)
#include <unistd.h>
#include <string.h>
#endif
diff --git a/storage/connect/tabext.cpp b/storage/connect/tabext.cpp
index 7be6c0e8328..139e4199ed9 100644
--- a/storage/connect/tabext.cpp
+++ b/storage/connect/tabext.cpp
@@ -286,7 +286,7 @@ bool TDBEXT::MakeSrcdef(PGLOBAL g)
char *catp = strstr(Srcdef, "%s");
if (catp) {
- char *fil1= 0, *fil2;
+ char *fil1 = 0, *fil2;
PCSZ ph = ((EXTDEF*)To_Def)->Phpos;
if (!ph)
diff --git a/storage/connect/tabjdbc.cpp b/storage/connect/tabjdbc.cpp
index adbfb2168ae..275b5edaeae 100644
--- a/storage/connect/tabjdbc.cpp
+++ b/storage/connect/tabjdbc.cpp
@@ -572,7 +572,7 @@ bool TDBJDBC::OpenDB(PGLOBAL g)
if (Memory < 3) {
// Method will depend on cursor type
- if ((Rbuf = Jcp->Rewind(Query->GetStr())) < 0)
+ if ((Rbuf = Query ? Jcp->Rewind(Query->GetStr()) : 0) < 0)
if (Mode != MODE_READX) {
Jcp->Close();
return true;
diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp
index 6151d924a9f..9e4f5ab987d 100644
--- a/storage/connect/tabjson.cpp
+++ b/storage/connect/tabjson.cpp
@@ -195,7 +195,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tdp->Fn = GetStringTableOption(g, topt, "Filename", NULL);
if (!(tdp->Database = SetPath(g, db)))
- return 0ULL;
+ return 0;
tdp->Objname = GetStringTableOption(g, topt, "Object", NULL);
tdp->Base = GetIntegerTableOption(g, topt, "Base", 0) ? 1 : 0;
@@ -243,14 +243,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tjsp = new(g) TDBJSON(tdp, new(g) MAPFAM(tdp));
if (tjsp->MakeDocument(g))
- return 0ULL;
+ return 0;
jsp = (tjsp->GetDoc()) ? tjsp->GetDoc()->GetValue(0) : NULL;
} else {
if (!(tdp->Lrecl = GetIntegerTableOption(g, topt, "Lrecl", 0)))
if (!mgo) {
sprintf(g->Message, "LRECL must be specified for pretty=%d", tdp->Pretty);
- return 0ULL;
+ return 0;
} else
tdp->Lrecl = 8192; // Should be enough
@@ -269,14 +269,14 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tjnp = new(g) TDBJSN(tdp, new(g) CMGFAM(tdp));
#else
sprintf(g->Message, "Mongo %s Driver not available", "C");
- return 0ULL;
+ return 0;
#endif
} else if (tdp->Driver && toupper(*tdp->Driver) == 'J') {
#if defined(JAVA_SUPPORT)
tjnp = new(g) TDBJSN(tdp, new(g) JMGFAM(tdp));
#else
sprintf(g->Message, "Mongo %s Driver not available", "Java");
- return 0ULL;
+ return 0;
#endif
} else { // Driver not specified
#if defined(CMGO_SUPPORT)
@@ -285,7 +285,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tjnp = new(g) TDBJSN(tdp, new(g) JMGFAM(tdp));
#else
sprintf(g->Message, MSG(NO_FEAT_SUPPORT), "MONGO");
- return 0ULL;
+ return 0;
#endif
} // endif Driver
@@ -304,7 +304,7 @@ int JSONDISC::GetColumns(PGLOBAL g, PCSZ db, PCSZ dsn, PTOS topt)
tjnp->SetG(G);
if (tjnp->OpenDB(g))
- return 0ULL;
+ return 0;
switch (tjnp->ReadDB(g)) {
case RC_EF: