Commit graph

1416 commits

Author SHA1 Message Date
Anel Husakovic
7eed97ed9f MDEV-25777: JAVA_INCLUDE_PATH and JAVA_INCLUDE_PATH2 not found with out of source configuration and Ninja generator
- As solution `PLUGIN_CONNECT=NO` use early check to disable plugin:
  Solution suggested by wlad@mariadb.com
- `JNI_FOUND` is a internal result variable and should be set with
cached library and header variables (like `JAVA_INCLUDE_PATH`) defined.
  * Note: wrapper cmake/FindJNI.cmake runs first time and cmake native Find<module> returns only cached variable, like `JAVA_INCLUDE_PATH`, results variable are not cached).

Reviewed by: serg@mariadb.com
2021-06-04 10:52:18 +02:00
Sergei Golubchik
d06205ba37 CONNECT: use my_snprintf 2021-05-27 17:36:32 +02:00
Sergei Golubchik
d7321893d8 CONNECT: move jar files to /usr/share and include them in DEBs 2021-05-22 21:56:51 +02:00
Sergei Golubchik
ad4b51948f Revert "Connect: remove Mongo dependencies"
This reverts commit 72fa9dabad

but doesn't recover deleted jars - they still exist in
mysql-test/connect/std_data, no need to have them twice.

Also it removes a redundant copy on JavaWrappers.jar
2021-05-08 18:02:11 +02:00
Marko Mäkelä
76c2b5106e Fix clang++-11 -Wsometimes-uninitialized 2021-05-07 14:52:46 +03:00
Nikita Malyavin
72fa9dabad Connect: remove Mongo dependencies 2021-05-03 19:02:05 +03:00
Olivier Bertrand
4df6952ce3 Typo modified: CMakeLists.txt 2021-04-09 16:10:37 +02:00
Olivier Bertrand
36fd94aa5c Remove add_jar modified: CMakeLists.txt 2021-04-09 15:24:34 +02:00
Olivier Bertrand
46340ad8d1 Fix add_jar modified: CMakeLists.txt 2021-04-09 14:41:50 +02:00
Olivier Bertrand
03f929aea8 Fix install modified: CMakeLists.txt 2021-04-09 11:58:13 +02:00
Olivier Bertrand
bbec4aafda typo tabrest.cpp 2021-04-08 19:05:11 +02:00
Olivier Bertrand
710e1bac5a tabrest.cpp 2021-04-08 19:05:10 +02:00
Olivier Bertrand
757aaa3bcc tabrest.cpp 2021-04-08 19:05:09 +02:00
Olivier Bertrand
e4c23fe2d0 tabrest.cpp 2021-04-08 17:35:21 +02:00
Olivier Bertrand
953c84657b try to fix tabrest.cpp compile error 2021-04-08 17:35:19 +02:00
Olivier Bertrand
26e5ba4b51 - Fix Linux compile errors
modified:   storage/connect/tabrest.cpp
  modified:   storage/connect/CMakeLists.txt

- Fix cmake error
 modified:   libmariadb/cmake/ConnectorName.cmake
2021-04-08 17:35:17 +02:00
Olivier Bertrand
d1b6cad028 Test tabrest.cpp fix 2021-04-08 17:35:16 +02:00
Olivier Bertrand
c030f4c625 Commit last pull from origin 2021-04-06 12:52:44 +02:00
Olivier Bertrand
28b76afcea - Fix(?) Linux compile errors
modified:   storage/connect/tabrest.cpp
  modified:   storage/connect/CMakeLists.txt

-fix MDEV-24794
 modified:   storage/connect/valblk.h
2021-04-06 00:10:07 +02:00
Olivier Bertrand
2aefe0bee1 - Fix crash when not specifying the collection for MongoDB
modified:   storage/connect/cmgoconn.cpp

- Fix(?) Linux compile errors
  modified:   storage/connect/tabrest.cpp
2021-04-05 18:33:37 +02:00
Olivier Bertrand
caff19ada5 - Copy Mongo2.jar and Mongo3.jar in plugin directory
modified:   storage/connect/CMakeLists.txt
  modified:   storage/connect/javaconn.cpp

- Check privileges while creating tables with Discovery
  modified:   storage/connect/ha_connect.cc

- Calculate LRECL for JSON tables created with Discovery
  modified:   storage/connect/tabjson.cpp

- Use CreateProcess (Windows) or fork/exec (linux)
  to retrieve the result from REST queries
  modified:   storage/connect/tabrest.cpp

- Typo
  modified:   storage/connect/jmgoconn.cpp
2021-04-05 17:01:43 +02:00
Olivier Bertrand
e85006e670 - Fix bug making REST table fail using CURL
This when the HTTP contains & characters
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabjson.cpp

- Make stringfy option work on only one Json item
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabbson.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h

- Make Json/Bson DATE columns accept JSON date syntax
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabjson.cpp

- Fix bug making REST table default file not being
  erased when dropping the table
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabrest.cpp
  modified:   storage/connect/tabxml.cpp

- Suppress CHAR(36) --> VARCHAR(36) when DEVELOPMENT
  This was fixed in MyClient
  modified:   storage/connect/ha_connect.cc
2021-03-16 23:32:58 +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
Olivier Bertrand
e7d9c1d498 Fix connect engine ppc64 fail 2021-02-05 18:34:06 +01:00
Olivier Bertrand
d788225b66 Fix bson_object_grp inverted args. Modified: storage/connect/bsonudf.cpp and bson_udf.result 2021-02-05 18:07:43 +01:00
Olivier Bertrand
ca63004190 - Fix bug causing bnx base wrong after CheckMemory
Add negative array indexes starting from the last
  modified:   storage/connect/bson.cpp
  modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/json.cpp
2021-02-05 11:55:47 +01:00
Olivier Bertrand
dc31627c2d Fix of connect engine crashes 2021-02-05 11:25:24 +01:00
Oleksandr Byelkin
c04ae0d365 Fix of crashes of connect engine.
Use size_t everywhere and remove suspicious expression.
2021-02-05 10:56:05 +01:00
Oleksandr Byelkin
87bf594bc5 Fix of random crashes of connect engine (probably depend on addresses used)- 2021-02-05 10:55:53 +01:00
Oleksandr Byelkin
716b0b44f8 Fix compiler warnings of the new connect engine. 2021-02-05 10:55:40 +01:00
Oleksandr Byelkin
b3cecb7bfc Revert "Fix of warnings on aarch64 like:"
Fixed by the author in other way (char -> short)

This reverts commit 496f7090a8.
2021-02-02 10:37:54 +01:00
Oleksandr Byelkin
7f7e66147d Merge remote-tracking branch 'connect/10.2' into 10.2 2021-02-02 10:36:46 +01:00
Olivier Bertrand
571294f954 Fix failed test bson and xml 2021-02-02 00:03:07 +01:00
Olivier Bertrand
c2aecb0575 Fix failed test bson and xml 2021-01-30 12:07:37 +01:00
Olivier Bertrand
7ab30f5d95 Update bson_get_item modified: bsonudf.cpp 2021-01-29 15:45:08 +01:00
Oleksandr Byelkin
9c84852809 fix of warning on windows 2021-01-29 13:40:05 +01:00
Oleksandr Byelkin
496f7090a8 Fix of warnings on aarch64 like:
bson.cpp:1775:3: error: case label value is less than minimum value for type [-Werror]
   case TYPE_NULL:
bson.cpp:1776:7: error: statement will never be executed [-Werror=switch-unreachable]
     b = true;
2021-01-29 12:35:17 +01:00
Oleksandr Byelkin
40868c4765 fix warnings returned by gcc v10.0 2021-01-29 12:04:09 +01:00
Oleksandr Byelkin
8b4d92aa4c Merge remote-tracking branch 'connect/10.2' 10.2 2021-01-29 12:03:11 +01:00
Olivier Bertrand
848a1a613c Fix decimal problems in bson udf's 2021-01-28 19:54:24 +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
9a07f30ba2 Fix some Json and Bson bugs 2021-01-20 19:19:54 +01:00
Olivier Bertrand
1d627ce47c Fix failed test 2021-01-13 00:23:08 +01:00
Olivier Bertrand
c9b5e5286b Fix failed test 2021-01-12 22:28:44 +01:00
Olivier Bertrand
347bce0201 - Remove static linkage to cpprestsdk when it is installed
modified:   storage/connect/CMakeLists.txt

- Continue BSON development
  modified:   storage/connect/bson.cpp
  modified:   storage/connect/bson.h
  modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/bsonudf.h
  added:      storage/connect/mysql-test/connect/r/bson_udf.result
  added:      storage/connect/mysql-test/connect/t/bson_udf.inc
  added:      storage/connect/mysql-test/connect/t/bson_udf.test
  added:      storage/connect/mysql-test/connect/t/bson_udf2.inc
2021-01-12 18:25:41 +01:00
Olivier Bertrand
70cfeb9bc9 Re-include BSON into CMakeLists.txt 2021-01-10 02:23:11 +01:00
Olivier Bertrand
251a55dcb4 Remove changes to CMakeLists.txt that cause compile error 2021-01-10 01:05:38 +01:00
Olivier Bertrand
02bb11709d - add the test on REST 2021-01-10 00:14:37 +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
Nikita Malyavin
e25623e78a MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failed
The assertion failed in handler::ha_reset upon SELECT under
READ UNCOMMITTED from table with index on virtual column.

This was the debug-only failure, though the problem is mush wider:
* MY_BITMAP is a structure containing my_bitmap_map, the latter is a raw
 bitmap.
* read_set, write_set and vcol_set of TABLE are the pointers to MY_BITMAP
* The rest of MY_BITMAPs are stored in TABLE and TABLE_SHARE
* The pointers to the stored MY_BITMAPs, like orig_read_set etc, and
 sometimes all_set and tmp_set, are assigned to the pointers.
* Sometimes tmp_use_all_columns is used to substitute the raw bitmap
 directly with all_set.bitmap
* Sometimes even bitmaps are directly modified, like in
TABLE::update_virtual_field(): bitmap_clear_all(&tmp_set) is called.

The last three bullets in the list, when used together (which is mostly
always) make the program flow cumbersome and impossible to follow,
notwithstanding the errors they cause, like this MDEV-17556, where tmp_set
pointer was assigned to read_set, write_set and vcol_set, then its bitmap
was substituted with all_set.bitmap by dbug_tmp_use_all_columns() call,
and then bitmap_clear_all(&tmp_set) was applied to all this.

To untangle this knot, the rule should be applied:
* Never substitute bitmaps! This patch is about this.
 orig_*, all_set bitmaps are never substituted already.

This patch changes the following function prototypes:
* tmp_use_all_columns, dbug_tmp_use_all_columns
 to accept MY_BITMAP** and to return MY_BITMAP * instead of my_bitmap_map*
* tmp_restore_column_map, dbug_tmp_restore_column_maps to accept
 MY_BITMAP* instead of my_bitmap_map*

These functions now will substitute read_set/write_set/vcol_set directly,
and won't touch underlying bitmaps.
2021-01-08 16:04:29 +10:00