From cdf00b8d92f9f49b33c7cf3f4390cb3d810f9c33 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Mon, 7 Aug 2017 16:24:53 +0200 Subject: - 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 --- storage/connect/tabjson.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'storage/connect/tabjson.cpp') 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 -- cgit v1.2.1