diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2017-08-07 16:24:53 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2017-08-07 16:24:53 +0200 |
commit | cdf00b8d92f9f49b33c7cf3f4390cb3d810f9c33 (patch) | |
tree | b6b55aaf1152d64829518e81110ba94ae8659192 /storage/connect/tabjson.cpp | |
parent | f5b0993bbdf8ce4b25cfb008fd57159cdcece6f7 (diff) | |
download | mariadb-git-cdf00b8d92f9f49b33c7cf3f4390cb3d810f9c33.tar.gz |
- Fix bug returning pointer to a stack string
in JVALUE::GetString
modified: storage/connect/json.cpp
modified: storage/connect/json.h
modified: storage/connect/jsonudf.cpp
- Fix a compiler bug happening on some configuration and platforms
in JSNX::CalculateArray
modified: storage/connect/jsonudf.cpp
- Set default Schema as current directory
This fix several bugs like:
Fail to make JSON catalog tables
Fail to use zipped file made by a file LOAD
modified: storage/connect/reldef.cpp
modified: storage/connect/tabjson.cpp
modified: storage/connect/tabjson.h
Diffstat (limited to 'storage/connect/tabjson.cpp')
-rw-r--r-- | storage/connect/tabjson.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 5c79e62b514..07361957465 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -500,7 +500,7 @@ JSONDEF::JSONDEF(void) Sep = '.'; #if defined(MONGO_SUPPORT) Uri = NULL; - Collname = Schema = Options = Filter = NULL; + Collname = Options = Filter = NULL; Pipe = false; Driver = NULL; Version = 0; @@ -515,7 +515,8 @@ JSONDEF::JSONDEF(void) /***********************************************************************/ bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR, int poff) { - Jmode = (JMODE)GetIntCatInfo("Jmode", MODE_OBJECT); + Schema = GetStringCatInfo(g, "DBname", Schema); + Jmode = (JMODE)GetIntCatInfo("Jmode", MODE_OBJECT); Objname = GetStringCatInfo(g, "Object", NULL); Xcol = GetStringCatInfo(g, "Expand", NULL); Pretty = GetIntCatInfo("Pretty", 2); @@ -528,7 +529,6 @@ bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR, int poff) Collname = GetStringCatInfo(g, "Name", (Catfunc & (FNC_TABLE | FNC_COL)) ? NULL : Name); Collname = GetStringCatInfo(g, "Tabname", Collname); - Schema = GetStringCatInfo(g, "Dbname", "test"); Options = GetStringCatInfo(g, "Colist", NULL); Filter = GetStringCatInfo(g, "Filter", NULL); Pipe = GetBoolCatInfo("Pipeline", false); @@ -2278,11 +2278,7 @@ void TDBJSON::CloseDB(PGLOBAL g) TDBJCL::TDBJCL(PJDEF tdp) : TDBCAT(tdp) { Topt = tdp->GetTopt(); -#if defined(MONGO_SUPPORT) Db = tdp->Schema; -#else - Db = NULL; -#endif Dsn = tdp->Uri; } // end of TDBJCL constructor |