mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
- Fix MDEV-15735 CONNECT [filamtxt.cpp:429]: Suspicious condition
modified: storage/connect/filamtxt.cpp - Fix MDEV-15577 CONNECT engine JDBC remote index prevents UPDATE Fixed in TDBJDBC::OpenDB because query can be null for updates modified: storage/connect/tabjdbc.cpp - Fix wrong updates of 10.3 distribution modified: storage/connect/ha_connect.cc modified: storage/connect/jsonudf.cpp modified: storage/connect/tabjson.cpp - Typo from 10.3 modified: storage/connect/mycat.cc modified: storage/connect/tabext.cpp modified: storage/connect/tabtbl.cpp modified: storage/connect/user_connect.cc
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
@@ -175,7 +170,7 @@
|
||||
#define JSONMAX 10 // JSON Default max grp size
|
||||
|
||||
extern "C" {
|
||||
char version[]= "Version 1.06.0007 March 11, 2018";
|
||||
char version[]= "Version 1.06.0007 May 01, 2018";
|
||||
#if defined(__WIN__)
|
||||
char compver[]= "Version 1.06.0007 " __DATE__ " " __TIME__;
|
||||
char slash= '\\';
|
||||
@@ -238,7 +233,7 @@ uint GetWorkSize(void);
|
||||
void SetWorkSize(uint);
|
||||
extern "C" const char *msglang(void);
|
||||
|
||||
static char *strz(PGLOBAL g, LEX_STRING &ls);
|
||||
static char *strz(PGLOBAL g, LEX_CSTRING &ls);
|
||||
|
||||
static void PopUser(PCONNECT xp);
|
||||
static PCONNECT GetUser(THD *thd, PCONNECT xp);
|
||||
|
@@ -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;
|
||||
|
||||
/*********************************************************************************/
|
||||
@@ -1669,7 +1667,7 @@ static PCSZ MakeKey(PGLOBAL g, UDF_ARGS *args, int i)
|
||||
int j = 0, n = args->attribute_lengths[i];
|
||||
my_bool b; // true if attribute is zero terminated
|
||||
PSZ p;
|
||||
const char *s = args->attributes[i];
|
||||
PCSZ s = args->attributes[i];
|
||||
|
||||
if (s && *s && (n || *s == '\'')) {
|
||||
if ((b = (!n || !s[n])))
|
||||
@@ -1688,7 +1686,7 @@ static PCSZ MakeKey(PGLOBAL g, UDF_ARGS *args, int i)
|
||||
} // endif *s
|
||||
|
||||
if (n < 1)
|
||||
return (char*) "Key";
|
||||
return "Key";
|
||||
|
||||
if (!b) {
|
||||
if ((p = (PSZ)PlgDBSubAlloc(g, NULL, n + 1))) {
|
||||
@@ -1702,10 +1700,10 @@ static PCSZ MakeKey(PGLOBAL g, UDF_ARGS *args, int i)
|
||||
|
||||
} // endif s
|
||||
|
||||
return (char*) s;
|
||||
return s;
|
||||
} // endif count
|
||||
|
||||
return (char*) "Key";
|
||||
return "Key";
|
||||
} // end of MakeKey
|
||||
|
||||
/*********************************************************************************/
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user