From de1a9b172ac38986ed8239dd0bc2d956ebef8f7f Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Mon, 29 May 2017 19:46:59 +0200 Subject: Add table option FILTER used by Mongo and Json tables. modified: storage/connect/ha_connect.cc modified: storage/connect/mongofam.cpp modified: storage/connect/mycat.h modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h modified: storage/connect/tabmgo.cpp modified: storage/connect/tabmgo.h Fix a regression bug in MongoFam (all = true only when no Options) modified: storage/connect/mongofam.cpp Fix a regression bug in JsonCol (in JSONCOL::GetJpath) modified: storage/connect/tabjson.cpp --- storage/connect/tabjson.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'storage/connect/tabjson.cpp') diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 98c9f080b48..e4246b7cf29 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -463,7 +463,7 @@ JSONDEF::JSONDEF(void) Sep = '.'; #if defined(MONGO_SUPPORT) Uri = NULL; - Collname = Schema = Options = NULL; + Collname = Schema = Options = Filter = NULL; Pipe = false; #endif // MONGO_SUPPORT } // end of JSONDEF constructor @@ -488,6 +488,7 @@ bool JSONDEF::DefineAM(PGLOBAL g, LPCSTR, int poff) Collname = GetStringCatInfo(g, "Tabname", Collname); Schema = GetStringCatInfo(g, "Dbname", "test"); Options = GetStringCatInfo(g, "Colist", NULL); + Filter = GetStringCatInfo(g, "Filter", NULL); Pipe = GetBoolCatInfo("Pipeline", false); Pretty = 0; #else // !MONGO_SUPPORT @@ -1323,7 +1324,7 @@ char *JSONCOL::GetJpath(PGLOBAL g, bool proj) *p2++ = '.'; break; case '[': - if (*p2 != '.') + if (*(p2 - 1) != '.') *p2++ = '.'; i = 1; -- cgit v1.2.1