diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2020-11-03 18:40:28 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2020-11-03 18:40:28 +0100 |
commit | 28af4212b6e2afe1d42729c9c36215ed8a8d38cb (patch) | |
tree | efae59d39a7a391fe87f8a6512945311a9cf6e32 /storage/connect/jsonudf.h | |
parent | dc3a693b7039cb4b1d46d797ca86364ac3173be7 (diff) | |
download | mariadb-git-28af4212b6e2afe1d42729c9c36215ed8a8d38cb.tar.gz |
- Implementation of the Json BJSON representation.
VAL structures replace VALUE classes in binary trees.
These parsed binary trees are swapped and saved on file
Swapping is to replace pointers by offsets to make it portable.
In restoring, class pointers to functions are realloced on place.
Making BJSON files is done by the new UDF function jfile_bjson.
modified: storage/connect/block.h
modified: storage/connect/filamtxt.cpp
modified: storage/connect/filamtxt.h
modified: storage/connect/global.h
modified: storage/connect/json.cpp
modified: storage/connect/json.h
modified: storage/connect/jsonudf.cpp
modified: storage/connect/jsonudf.h
modified: storage/connect/tabjson.cpp
modified: storage/connect/tabjson.h
modified: storage/connect/value.h
- Make file (record) length and map memory possibly larger than MAX_INT
modified: storage/connect/filamap.cpp
modified: storage/connect/filamvct.cpp
modified: storage/connect/maputil.cpp
modified: storage/connect/maputil.h
modified: storage/connect/tabdos.cpp
modified: storage/connect/xindex.cpp
- Make column length as bytes (not characters)
This when making column definitions
modified: storage/connect/ha_connect.cc
- Change the message when making index fails
modified: storage/connect/ha_connect.cc
- Update tests and results to reflect recent changes
modified: storage/connect/mysql-test/connect/r/alter_xml.result
modified: storage/connect/mysql-test/connect/r/alter_xml2.result
modified: storage/connect/mysql-test/connect/r/jdbc_oracle.result
modified: storage/connect/mysql-test/connect/r/json.result
modified: storage/connect/mysql-test/connect/r/json_java_2.result
modified: storage/connect/mysql-test/connect/r/json_java_3.result
modified: storage/connect/mysql-test/connect/r/json_mongo_c.result
modified: storage/connect/mysql-test/connect/r/mongo_c.result
modified: storage/connect/mysql-test/connect/r/mongo_java_2.result
modified: storage/connect/mysql-test/connect/r/mongo_java_3.result
modified: storage/connect/mysql-test/connect/r/odbc_oracle.result
modified: storage/connect/mysql-test/connect/r/xml.result
modified: storage/connect/mysql-test/connect/r/xml2.result
modified: storage/connect/mysql-test/connect/r/xml2_html.result
modified: storage/connect/mysql-test/connect/r/xml2_mult.result
modified: storage/connect/mysql-test/connect/r/xml2_zip.result
modified: storage/connect/mysql-test/connect/r/xml_html.result
modified: storage/connect/mysql-test/connect/r/xml_mult.result
modified: storage/connect/mysql-test/connect/r/xml_zip.result
modified: storage/connect/mysql-test/connect/t/alter_xml.test
modified: storage/connect/mysql-test/connect/t/alter_xml2.test
modified: storage/connect/mysql-test/connect/t/jdbc_oracle.test
modified: storage/connect/mysql-test/connect/t/json.test
modified: storage/connect/mysql-test/connect/t/mongo_test.inc
modified: storage/connect/mysql-test/connect/t/odbc_oracle.test
modified: storage/connect/mysql-test/connect/t/xml.test
modified: storage/connect/mysql-test/connect/t/xml2.test
modified: storage/connect/mysql-test/connect/t/xml2_html.test
modified: storage/connect/mysql-test/connect/t/xml2_mult.test
modified: storage/connect/mysql-test/connect/t/xml2_zip.test
modified: storage/connect/mysql-test/connect/t/xml_html.test
modified: storage/connect/mysql-test/connect/t/xml_mult.test
modified: storage/connect/mysql-test/connect/t/xml_zip.test
- Typo
modified: storage/connect/value.cpp
Diffstat (limited to 'storage/connect/jsonudf.h')
-rw-r--r-- | storage/connect/jsonudf.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/storage/connect/jsonudf.h b/storage/connect/jsonudf.h index 897b0fe9919..f5b2bf75654 100644 --- a/storage/connect/jsonudf.h +++ b/storage/connect/jsonudf.h @@ -239,6 +239,10 @@ extern "C" { DllExport char* jfile_convert(UDF_EXEC_ARGS); DllExport void jfile_convert_deinit(UDF_INIT*); + DllExport my_bool jfile_bjson_init(UDF_INIT*, UDF_ARGS*, char*); + DllExport char* jfile_bjson(UDF_EXEC_ARGS); + DllExport void jfile_bjson_deinit(UDF_INIT*); + DllExport my_bool envar_init(UDF_INIT*, UDF_ARGS*, char*); DllExport char *envar(UDF_EXEC_ARGS); @@ -292,13 +296,14 @@ protected: PVAL MakeJson(PGLOBAL g, PJSON jsp); void SetJsonValue(PGLOBAL g, PVAL vp, PJVAL val, int n); PJSON GetRow(PGLOBAL g); - my_bool LocateArray(PJAR jarp); - my_bool LocateObject(PJOB jobp); - my_bool LocateValue(PJVAL jvp); - my_bool LocateArrayAll(PJAR jarp); - my_bool LocateObjectAll(PJOB jobp); - my_bool LocateValueAll(PJVAL jvp); - my_bool CompareTree(PJSON jp1, PJSON jp2); + my_bool CompareValues(PVL v1, PVL v2); + my_bool LocateArray(PGLOBAL g, PJAR jarp); + my_bool LocateObject(PGLOBAL g, PJOB jobp); + my_bool LocateValue(PGLOBAL g, PJVAL jvp); + my_bool LocateArrayAll(PGLOBAL g, PJAR jarp); + my_bool LocateObjectAll(PGLOBAL g, PJOB jobp); + my_bool LocateValueAll(PGLOBAL g, PJVAL jvp); + my_bool CompareTree(PGLOBAL g, PJSON jp1, PJSON jp2); my_bool AddPath(void); // Default constructor not to be used @@ -355,11 +360,11 @@ public: void CopyNumeric(PGLOBAL g); // Members - FILE* fs; - char* s; - char* buff; - int len; - int recl; - int i, k; + FILE *fs; + char *s; + char *buff; + size_t len; + int recl; + int i, k; }; // end of class JUP |