summaryrefslogtreecommitdiff
path: root/storage/connect
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2021-05-02 11:03:21 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2021-05-02 11:03:21 +0200
commit2294f9de8d939688b2ca34858ce72eecb19fb472 (patch)
tree6d417e2a73987fcaf7bd30831b5043a21ba471e0 /storage/connect
parentef0829ef40eb4136eed4282057baa4126dd66b69 (diff)
downloadmariadb-git-2294f9de8d939688b2ca34858ce72eecb19fb472.tar.gz
Fix compile warning as error
Diffstat (limited to 'storage/connect')
-rw-r--r--storage/connect/cmgoconn.cpp10
-rw-r--r--storage/connect/ha_connect.cc6
-rw-r--r--storage/connect/json.h1
3 files changed, 9 insertions, 8 deletions
diff --git a/storage/connect/cmgoconn.cpp b/storage/connect/cmgoconn.cpp
index 7aa35253514..cd2a8b63cdb 100644
--- a/storage/connect/cmgoconn.cpp
+++ b/storage/connect/cmgoconn.cpp
@@ -250,16 +250,16 @@ int CMgoConn::CollSize(PGLOBAL g)
} else
query = bson_new();
-#if defined(NDEBUG)
- cnt = (int)mongoc_collection_count(Collection,
- MONGOC_QUERY_NONE, query, 0, 0, NULL, &Error);
-#else
+#if defined(DEVELOPMENT)
if (jf)
cnt = (int)mongoc_collection_count_documents(Collection,
query, NULL, NULL, NULL, &Error);
else
cnt = (int)mongoc_collection_estimated_document_count(
- Collection, NULL, NULL, NULL, &Error);
+ Collection, NULL, NULL, NULL, &Error);
+#else
+ cnt = (int)mongoc_collection_count(Collection,
+ MONGOC_QUERY_NONE, query, 0, 0, NULL, &Error);
#endif
if (cnt < 0) {
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index f85035d6e06..041c29dc111 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -170,9 +170,9 @@
#define JSONMAX 10 // JSON Default max grp size
extern "C" {
- char version[]= "Version 1.07.0002 March 22, 2021";
+ char version[]= "Version 1.07.0003 March 22, 2021";
#if defined(__WIN__)
- char compver[]= "Version 1.07.0002 " __DATE__ " " __TIME__;
+ char compver[]= "Version 1.07.0003 " __DATE__ " " __TIME__;
char slash= '\\';
#else // !__WIN__
char slash= '/';
@@ -7511,7 +7511,7 @@ maria_declare_plugin(connect)
0x0107, /* version number (1.07) */
NULL, /* status variables */
connect_system_variables, /* system variables */
- "1.07.0002", /* string version */
+ "1.07.0003", /* string version */
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
}
maria_declare_plugin_end;
diff --git a/storage/connect/json.h b/storage/connect/json.h
index ef5f6c7b7de..26b73faef12 100644
--- a/storage/connect/json.h
+++ b/storage/connect/json.h
@@ -66,6 +66,7 @@ const char* GetFmt(int type, bool un);
PJSON ParseJson(PGLOBAL g, char* s, size_t n, int* prty = NULL, bool* b = NULL);
PSZ Serialize(PGLOBAL g, PJSON jsp, char *fn, int pretty);
DllExport bool IsNum(PSZ s);
+bool IsArray(PSZ s);
/***********************************************************************/
/* Class JDOC. The class for parsing and serializing json documents. */