1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

- Fix MDEV-13463 unescape table name during detection of table structure

modified:   storage/connect/myconn.cpp

- Remove a few gcc warnings
  modified:   storage/connect/jmgoconn.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/tabjson.cpp
This commit is contained in:
Olivier Bertrand
2017-08-08 17:36:54 +02:00
parent 017d9ccf5d
commit 4d4ba60c6e
4 changed files with 8 additions and 6 deletions

View File

@@ -732,7 +732,7 @@ int JMgoConn::DocUpdate(PGLOBAL g, PTDB tdbp)
return RC_FX;
if (env->CallBooleanMethod(job, docaddid, updlist, jkey, val))
return NULL;
return RC_OK;
env->DeleteLocalRef(jkey);
} // endfor colp
@@ -742,7 +742,7 @@ int JMgoConn::DocUpdate(PGLOBAL g, PTDB tdbp)
jkey = env->NewStringUTF("$set");
if (env->CallBooleanMethod(job, docaddid, upd, jkey, updlist))
return NULL;
return RC_OK;
env->DeleteLocalRef(jkey);

View File

@@ -53,6 +53,8 @@ PSZ Serialize(PGLOBAL g, PJSON jsp, char *fn, int pretty);
bool SerializeArray(JOUT *js, PJAR jarp, bool b);
bool SerializeObject(JOUT *js, PJOB jobp);
bool SerializeValue(JOUT *js, PJVAL jvp);
bool IsNum(PSZ s);
char *NextChr(PSZ s, char sep);
/***********************************************************************/
/* Class JOUT. Used by Serialize. */

View File

@@ -139,7 +139,7 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
unsigned int length[] = {0, 4, 0, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0};
PCSZ fmt;
char *fld, *colname, *chset, v, buf[128], uns[16], zero[16];
int i, n, nf, ncol = sizeof(buftyp) / sizeof(int);
int i, n, nf = 0, ncol = sizeof(buftyp) / sizeof(int);
int len, type, prec, rc, k = 0;
bool b;
PQRYRES qrp;
@@ -160,7 +160,9 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
/* Do an evaluation of the result size. */
/********************************************************************/
STRING cmd(g, 64, "SHOW FULL COLUMNS FROM ");
b = cmd.Append((PSZ)table);
b = cmd.Append('`');
b |= cmd.Append((PSZ)table);
b |= cmd.Append('`');
b |= cmd.Append(" FROM ");
b |= cmd.Append((PSZ)(db ? db : PlgGetUser(g)->DBName));

View File

@@ -54,8 +54,6 @@
/* External functions. */
/***********************************************************************/
USETEMP UseTemp(void);
bool IsNum(PSZ s);
char *NextChr(PSZ s, char sep);
char *GetJsonNull(void);
typedef struct _jncol {