Commit graph

141 commits

Author SHA1 Message Date
Oleksandr Byelkin
ae6bdc6769 Merge branch '10.4' into 10.5 2021-07-31 23:19:51 +02:00
Oleksandr Byelkin
7841a7eb09 Merge branch '10.3' into 10.4 2021-07-31 22:59:58 +02:00
Oleksandr Byelkin
83d7e4faf6 Merge branch '10.2' into 10.3 2021-07-29 13:51:02 +02:00
Sergei Golubchik
a32373b65a Merge remote-tracking branch 'connect/10.2' into 10.2 2021-07-27 18:25:42 +02:00
Olivier Bertrand
0f18135ec8 - Make user variable prefix recognized by IsArgJson and IsJson
modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/jsonudf.cpp

- Stringify option is now a ; separated list of columns
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/mongo.h
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabcmg.cpp
  modified:   storage/connect/tabcmg.h
  modified:   storage/connect/tabjmg.cpp
  modified:   storage/connect/tabjmg.h
  modified:   storage/connect/tabjson.cpp

- PrepareColist not a static function anymore (+ typo)
  modified:   storage/connect/taboccur.cpp

- JDVC: Recognize schema (database) from a wrapper server
  modified:   storage/connect/tabjdbc.cpp
2021-07-24 16:28:57 +02:00
Olivier Bertrand
e0edfc277f - Fix MDEV-25715
modified:   storage/connect/bsonudf.cpp
    modified:   storage/connect/jsonudf.cpp
2021-05-18 16:42:19 +02:00
Marko Mäkelä
0e1437e147 Merge 10.4 into 10.5 2021-05-10 10:01:15 +03:00
Marko Mäkelä
8c73fab7f7 Merge 10.3 into 10.4 2021-05-10 09:52:01 +03:00
Marko Mäkelä
98e6159892 Merge 10.2 into 10.3 2021-05-10 09:09:50 +03:00
Marko Mäkelä
76c2b5106e Fix clang++-11 -Wsometimes-uninitialized 2021-05-07 14:52:46 +03:00
Nikita Malyavin
3f55c56951 Merge branch bb-10.4-release into bb-10.5-release 2021-05-05 23:57:11 +03:00
Nikita Malyavin
509e4990af Merge branch bb-10.3-release into bb-10.4-release 2021-05-05 23:03:01 +03:00
Nikita Malyavin
a8a925dd22 Merge branch bb-10.2-release into bb-10.3-release 2021-05-04 14:49:31 +03:00
Olivier Bertrand
c030f4c625 Commit last pull from origin 2021-04-06 12:52:44 +02:00
David CARLIER
a6cd4612a9 connect storage, little compile issues fix proposal. 2021-03-11 09:36:23 +01:00
Olivier Bertrand
801a6d500f - Add new JPATH features
modified:   storage/connect/bson.cpp
  modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/bsonudf.h
  modified:   storage/connect/json.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
  modified:   storage/connect/mysql-test/connect/r/json_udf.result
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
2021-02-16 00:31:27 +01:00
Sergei Golubchik
25d9d2e37f Merge branch 'bb-10.4-release' into bb-10.5-release 2021-02-15 16:43:15 +01:00
Sergei Golubchik
00a313ecf3 Merge branch 'bb-10.3-release' into bb-10.4-release
Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution"
was null-merged. 10.4 version of the fix is coming up separately
2021-02-12 17:44:22 +01:00
Oleksandr Byelkin
6f93df1c2e Merge branch '10.2' into 10.3 2021-02-05 20:56:33 +01:00
Oleksandr Byelkin
7f7e66147d Merge remote-tracking branch 'connect/10.2' into 10.2 2021-02-02 10:36:46 +01:00
Sergei Golubchik
60ea09eae6 Merge branch '10.2' into 10.3 2021-02-01 13:49:33 +01:00
Oleksandr Byelkin
40868c4765 fix warnings returned by gcc v10.0 2021-01-29 12:04:09 +01:00
Olivier Bertrand
7edd4294be - Continue BSON development
modified:   storage/connect/bson.cpp
  modified:   storage/connect/bson.h
  modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/bsonudf.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/mysql-test/connect/r/bson.result
  modified:   storage/connect/mysql-test/connect/r/bson_udf.result
  modified:   storage/connect/mysql-test/connect/t/bson_udf.inc
  modified:   storage/connect/mysql-test/connect/t/bson_udf.test
  modified:   storage/connect/mysql-test/connect/t/bson_udf2.inc
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabbson.h
2021-01-28 01:02:29 +01:00
Olivier Bertrand
8f34d45404 - Add the new BSON temporary type for testing
modified:   storage/connect/CMakeLists.txt
  modified:   storage/connect/bson.cpp
  modified:   storage/connect/bson.h
  modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/bsonudf.h
  modified:   storage/connect/global.h
  modified:   storage/connect/json.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/mysql-test/connect/disabled.def
  modified:   storage/connect/mysql-test/connect/t/mongo_test.inc
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabjson.cpp
2021-01-08 22:18:52 +01:00
Olivier Bertrand
cba46c9912 - Fix jfile_convert crash on error. modified: jsonudf.cpp (plus BSON UDF's) 2020-12-31 15:43:52 +01:00
Olivier Bertrand
a786741000 - Fix crash with JsonContains UDF + BSON development 2020-12-17 13:58:13 +01:00
Olivier Bertrand
4eeadedc77 - Fix json_bjson (s was erase by Json_Subset)
modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h

- Fix compile error (Force_Bson was not conditional by BSON_SUPPORT)
  modified:   storage/connect/ha_connect.cc

- Continue Bjson implementation
  modified:   storage/connect/block.h
  modified:   storage/connect/bson.cpp
  modified:   storage/connect/bson.h
  modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/bsonudf.h
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabjson.cpp

- Typo
  deleted:    storage/connect/Header.h
2020-12-09 00:55:06 +01:00
Olivier Bertrand
4e8af8a664 - Fix memory leak for the JSON table type
(and continue BSON implementatio)
  modified:   storage/connect/bson.cpp
  modified:   storage/connect/bson.h
  modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/connect.cc
  modified:   storage/connect/global.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/plgdbsem.h
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/user_connect.cc

- Desesperatly trying to fix xml.test failure
  modified:   storage/connect/mysql-test/connect/r/xml.result
2020-12-01 19:39:09 +01:00
Olivier Bertrand
950bf6ab53 - Begin implementation of BSON
modified:   storage/connect/bson.cpp
  modified:   storage/connect/bson.h
  modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/bsonudf.h
  modified:   storage/connect/jsonudf.cpp
2020-11-27 10:25:47 +01:00
Olivier Bertrand
b656d3d333 Desesperatly trying to stop compiling failures 2020-11-25 17:42:01 +01:00
Olivier Bertrand
dc8f914c38 Remove based enum not accepted by most gcc compilers 2020-11-25 12:56:45 +01:00
Olivier Bertrand
477b5256dd Fix some test failure 2020-11-21 21:52:48 +01:00
Olivier Bertrand
9055db73d5 Commit new source and all recent changes. 2020-11-18 14:37:44 +01:00
Olivier Bertrand
878065b4df Fix compile error (sign-compare) Modified jsonudf.cpp jsonudf.h 2020-11-08 14:25:35 +01:00
Olivier Bertrand
fb86a496c0 Re-fix compile error (overloaded-virtual) 2020-11-07 22:36:50 +01:00
Olivier Bertrand
46edfd6338 - Getting text of json items now includes all array members
modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
  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_mongo_c.result
  modified:   storage/connect/mysql-test/connect/r/json_udf.result
  modified:   storage/connect/mysql-test/connect/r/json_udf_bin.result
  modified:   storage/connect/mysql-test/connect/r/zip.result
  modified:   storage/connect/mysql-test/connect/t/zip.test
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/xobject.h
2020-11-07 15:40:46 +01:00
Olivier Bertrand
78ccc605a5 Fix compile error on LINUX (LARGE_INTEGER) 2020-11-03 23:19:22 +01:00
Olivier Bertrand
28af4212b6 - 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
2020-11-03 18:40:28 +01:00
Marko Mäkelä
898521e2dd Merge 10.4 into 10.5 2020-10-30 11:15:30 +02:00
Marko Mäkelä
7b2bb67113 Merge 10.3 into 10.4 2020-10-29 13:38:38 +02:00
Marko Mäkelä
a8de8f261d Merge 10.2 into 10.3 2020-10-28 10:01:50 +02:00
Olivier Bertrand
dc3a693b70 - Inline MakePtr and MakeOff with OFFSET as size_t
Also add a new member Saved_Size in the Global structure.
  modified:   storage/connect/global.h
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/user_connect.cc
  modified:   storage/connect/jsonudf.cpp

- Add session variables json_all_path and default_depth
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mongo.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabxml.cpp

- ADD column options JPATH and XPATH
  Work as FIELD_FORMAT but are more readable
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h
  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

- Handle negative numbes in the option list
  modified:   storage/connect/ha_connect.cc

- Fix Json parse that could crash the server.
  Was because it could use THROW out of the TRY block.
  Also handle all error by THROW.
  It is now done by a new class JSON.
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h

- Add a new UDF function jfile_translate.
  It translate a Json file to pretty = 0.
  Fast because it does not a real parse of the file.
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h

- Add a now options JSIZE and STRINGIFY to Json tables.
  STRINGIFY makes Objects or Arrays to be returned by their
  json representation instead of by their concatenated values.
  JSIZE allows to specify the LRECL (was 256) defaults to 1024.
  Also fix a bug about locating the sub-table by its path.
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
2020-10-18 17:20:44 +02:00
Olivier Bertrand
307258c8ee - Use BIN type when charset='binary'
modified:   storage/connect/ha_connect.cc

- Allow JSON columns to be "binary"
  By setting their type as VARBINAY(132)
  and their name begin with Jbin_
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/value.cpp
  modified:   storage/connect/value.h

- CHARSET BINARY cannot be used for text columns
  modified:   storage/connect/mysql-test/connect/r/updelx.result
  modified:   storage/connect/mysql-test/connect/t/updelx.test
2020-10-05 12:29:51 +02:00
Olivier Bertrand
99ab562a92 - Make possible to allocate work space larger than 4GB
All variables handling sizes that were uint are now size_t.
  The variable connect_work_size is now ulong (was uint);
  Also make Json functiosn to allocate a larger memory (M=9 was 7)
  modified:   storage/connect/global.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/json.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/user_connect.cc

- Fix uninitialised variable (pretty) in Json_File.
  Make Jbin_file accept the same arguments as Json_File ones.
  modified:   storage/connect/jsonudf.cpp

- Change the Level option to Depth (the word currently used)
  (Level being still accepted)
  modified:   storage/connect/mongo.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabxml.cpp

- Suppress 2nd argument default value for MYSQLtoPLG function
  modified:   storage/connect/myutil.h

- Allow REST tables to be create not specifying a file_name
  modified:   storage/connect/tabrest.cpp
2020-10-01 19:18:26 +02:00
Marko Mäkelä
8b6cfda631 Merge 10.4 into 10.5 2020-02-07 08:51:20 +02:00
Monty
4d61f1247a Fixed compiler warnings from gcc 7.4.1
- Fixed possible error in rocksdb/rdb_datadic.cc
2020-01-29 23:23:55 +02:00
Marko Mäkelä
780d2bb8a7 Merge 10.4 into 10.5 2019-09-06 14:25:20 +03:00
Oleksandr Byelkin
b0ff5a6a73 Merge branch '10.2' into 10.3 2019-09-02 09:01:54 +02:00
Monty
a38f47e90c Fixed compiler warnings from connect engine
- clang complains about register in C++
- Removed not used variables
- Fixed bug when printing date in filamdbf.cpp
- Added {} to fix warning about dangling else
- Changed connect_done_func() to be global to remove conflict with header
  files
- Added extra () around assignment in if
2019-08-23 22:03:54 +02:00
Olivier Bertrand
e4797a991f In CONNECT version 1.6.10 NOSQL facility is enhanced by a new way to retrieve NOSQL data.
In addition to files and Mongo collections, JSON as well as XML and CSV data can be retrieved
from the net as answers from REST queries. Because it uses and external package (cpprestsdk)
this is currently available only to MariaDB servers compiled from source.

-- Add the REST support when Microsoft Casablanca package (cpprestsdk) is installed.
-- Also include some changes specific to MariaDB 10.3.
  modified:   storage/connect/CMakeLists.txt

-- Add conditional REST support
-- Added string options HTTP and URI.
-- Added added internal table type TAB_REST.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/mycat.h
  modified:   storage/connect/plgdbsem.h

-- Fix MDEV-19648 Variable connect_conv_size doesn't change
-- Change Variable wrong block parameter from 8169 to 1.
-- Also change connect_conv_size default value to 1024.
  modified:   storage/connect/ha_connect.cc

-- Avoid possible buffer overflow
-- In particular by the function ShowValue.
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/value.cpp
  modified:   storage/connect/value.h

-- Add some cast to avoid some compiler warnings
  modified:   storage/connect/filamdbf.cpp

-- Fix some C++ error
  modified:   storage/connect/javaconn.cpp
  modified:   storage/connect/jmgoconn.cpp
  modified:   storage/connect/plugutil.cpp

-- Miscellaneous Typo and warning suppressing changes
  modified:   storage/connect/connect.cpp
  modified:   storage/connect/connect.h
  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/inihandl.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/libdoc.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabtbl.cpp
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/user_connect.cc
  modified:   storage/connect/user_connect.h

-- Update failing test results and disbling
  modified:   storage/connect/mysql-test/connect/disabled.def
  modified:   storage/connect/mysql-test/connect/r/dir.result
  modified:   storage/connect/mysql-test/connect/r/grant.result
  modified:   storage/connect/mysql-test/connect/r/jdbc.result
  modified:   storage/connect/mysql-test/connect/r/jdbc_postgresql.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_mult.result
  modified:   storage/connect/mysql-test/connect/r/xml_mult.result

-- Add an option
  modified:   storage/connect/mysql-test/connect/t/grant.test
2019-07-30 22:45:04 +02:00