diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2017-05-29 19:46:59 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2017-05-29 19:46:59 +0200 |
commit | de1a9b172ac38986ed8239dd0bc2d956ebef8f7f (patch) | |
tree | e5d85e96afb4973b9f3c3c40851aa199b6f5c4a7 /storage/connect/tabjson.cpp | |
parent | cbdfdfc829ec8c0e0bcd426d5a18d9c97e1065f8 (diff) | |
download | mariadb-git-de1a9b172ac38986ed8239dd0bc2d956ebef8f7f.tar.gz |
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
Diffstat (limited to 'storage/connect/tabjson.cpp')
-rw-r--r-- | storage/connect/tabjson.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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; |