Commit graph

21394 commits

Author SHA1 Message Date
Olivier Bertrand
ceacffbb3b - Fix pretty=2 Tabjson bug on INSERT.
Occuring when inserting more than one line in one statement.
  modified:   storage/connect/json.cpp

- Fix a wrong if statement
  modified:   storage/connect/tabjson.cpp

- Continue BSON implementation
  modified:   storage/connect/bson.cpp
  modified:   storage/connect/bson.h
  modified:   storage/connect/filamtxt.cpp
  modified:   storage/connect/filamtxt.h
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabbson.h

- No need anymore
  deleted:    storage/connect/mysql-test/connect/r/bson.result
  deleted:    storage/connect/mysql-test/connect/t/bson.test
2020-12-15 12:28:03 +01:00
Olivier Bertrand
aa10789f47 BSON development 2020-12-11 16:34:50 +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
871532c3b9 - Continue BSON implementation
modified:   storage/connect/bson.cpp
  modified:   storage/connect/bson.h
  modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/cmgfam.cpp
  modified:   storage/connect/cmgfam.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jmgfam.cpp
  modified:   storage/connect/jmgfam.h
  modified:   storage/connect/jmgoconn.cpp
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabjson.cpp
2020-12-08 01:15:40 +01:00
Olivier Bertrand
c05b1288fd Remove a push warning causing failing assert. Modified storage/connect/filamap.cpp 2020-12-04 23:21:59 +01:00
Olivier Bertrand
4b6d661c7f Fix failed compile modified storage/connect/ha_connect.cc 2020-12-02 00:35:58 +01:00
Olivier Bertrand
7d439334ff Fix failed compile modified storage/connect/ha_connect.cc and mycat.cc 2020-12-01 20:57:05 +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
dae4bd0b36 Fix xml.test failure. Fix compile error modified json.h 2020-11-21 23:14:06 +01:00
Olivier Bertrand
477b5256dd Fix some test failure 2020-11-21 21:52:48 +01:00
Olivier Bertrand
038381e110 Fix compile error. Modified json.cpp 2020-11-20 15:21:06 +01:00
Olivier Bertrand
000268d46f Fix some json discovery problems. Modified tabjson.cpp tabjson.h 2020-11-19 19:05:04 +01:00
Olivier Bertrand
9055db73d5 Commit new source and all recent changes. 2020-11-18 14:37:44 +01:00
Daniel Black
9b30212f15 MDEV-24161: shortcut OQGRAPH dependency checks if disabled
Reviewer: Brad Smith
2020-11-16 09:47:19 +11:00
Olivier Bertrand
8771390dfd Change cURL option from > to -o. modified storage/connect/tabrest.cpp 2020-11-14 18:28:16 +01:00
Olivier Bertrand
9193ceb2c4 Fix getting proper table type in discovery. modified storage/connect/ha_connect.cc 2020-11-13 19:42:56 +01:00
Marko Mäkelä
bb328a2a27 MDEV-24188 Hang in buf_page_create() after reusing a previously freed page
The fix of MDEV-23456 (commit b1009ae5c1)
introduced a livelock between page flushing and a thread that is
executing buf_page_create().

buf_page_create(): If the current mini-transaction is holding
an exclusive latch on the page, do not attempt to acquire another
one, and do not care about any I/O fix.

mtr_t::have_x_latch(): Replaces mtr_t::get_fix_count().

dyn_buf_t::for_each_block(const Functor&) const: A new variant.

rw_lock_own(): Add a const qualifier.

Reviewed by: Thirunarayanan Balathandayuthapani
2020-11-13 20:16:39 +02:00
Olivier Bertrand
17ea1efe0a Fix using a null pointer. modified storage/connect/tabrest.cpp 2020-11-11 17:41:11 +01:00
Marko Mäkelä
d6ee28582a Cleanup: Remove dict_space_is_empty(), dict_space_get_id()
As noted in commit 0b66d3f70d,
MariaDB does not support CREATE TABLESPACE for InnoDB.
Hence, some code that was added in
commit fec844aca8
and originally in
mysql/mysql-server@c71dd213bd
is unused in MariaDB and should be removed.
2020-11-11 15:48:43 +02:00
Marko Mäkelä
7b7e5922af MDEV-24156 trx_undo_left() fails to prevent overflow
trx_undo_left(): Return 0 in case of an overflow, instead of
returning a negative number interpreted as a large positive number.
Also, add debug assertions to check that the pointer is within
the page area. This should allow us to catch bugs like
MDEV-24096 easier in the future.
2020-11-11 15:48:43 +02:00
Marko Mäkelä
bd528b0c93 MDEV-24182 ibuf_merge_or_delete_for_page() contains dead code
The function ibuf_merge_or_delete_for_page() was always being
invoked with update_ibuf_bitmap=true ever since
commit cd623508df
fixed up something after MDEV-9566.

Furthermore, the parameter page_size is never being passed as a
null pointer, and therefore it should better be a reference to
a constant object.
2020-11-11 15:48:43 +02:00
Olivier Bertrand
8c617e9901 Add getting REST query answer via curl. modified storage/connect/tabrest.cpp 2020-11-11 12:55:07 +01:00
Marko Mäkelä
5171ab808c MDEV-24171 index_online_log is instrumented as rw-lock, not mutex
The row_log_t::mutex is a mutex, yet it was instrumented as
rw-lock in PERFORMANCE_SCHEMA.
2020-11-10 07:56:04 +02:00
Marko Mäkelä
d01a034ac6 MDEV-7620: Remove the data structures
The instrumentation that was added in
commit 90635c6fb5 (MDEV-7620)
was effectively reverted in MariaDB Server 10.2.2, in
commit 2e814d4702
(which stopped reporting the statistics) and
commit fec844aca8
(which stopped updating the statistics).

Let us remove the orphan data members to reduce the memory footprint.
2020-11-09 15:50:37 +02:00
Olivier Bertrand
878065b4df Fix compile error (sign-compare) Modified jsonudf.cpp jsonudf.h 2020-11-08 14:25:35 +01:00
Olivier Bertrand
73850edd04 Re-fix compile error (conversion-null) Modified json.cpp 2020-11-08 12:14:33 +01:00
Olivier Bertrand
90405763cf Re-fix compile error (sign-unsign) Modified filamtxt.cpp 2020-11-07 23:58:57 +01:00
Olivier Bertrand
8985933881 Re-fix compile error (sign-unsign) Modified filamtxt.cpp 2020-11-07 23:22:28 +01:00
Olivier Bertrand
fb86a496c0 Re-fix compile error (overloaded-virtual) 2020-11-07 22:36:50 +01:00
Olivier Bertrand
e4294729d4 Fix compile error (overloaded-virtual) 2020-11-07 19:50:29 +01:00
Olivier Bertrand
3ad6c0ef8a Fix compile error. Modified ha_connect.cc 2020-11-07 16:33:01 +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
d3372258b0 Update tests to cope with changes 2020-11-06 15:34:13 +01:00
Olivier Bertrand
a4e999eec5 Try to fix failing tests 2020-11-05 23:04:37 +01:00
Olivier Bertrand
addb28f62d Try to fix failing tests 2020-11-05 22:14:01 +01:00
Olivier Bertrand
ecb00f3cd8 Try to fix failing tests 2020-11-05 19:13:26 +01:00
Olivier Bertrand
a13642a82f Try to fix that F..k gcc operator delete error 2020-11-04 16:33:10 +01:00
Olivier Bertrand
6a94ad98fb Fix crash on Json date columns 2020-11-04 15:46:02 +01:00
Olivier Bertrand
49428c8fa6 Fix compile error on LINUX (no suitable operator delete) 2020-11-04 11:36:29 +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ä
8036d0a359 MDEV-22387: Do not violate __attribute__((nonnull))
This follows up commit
commit 94a520ddbe and
commit 7c5519c12d.

After these changes, the default test suites on a
cmake -DWITH_UBSAN=ON build no longer fail due to passing
null pointers as parameters that are declared to never be null,
but plenty of other runtime errors remain.
2020-11-02 14:19:21 +02:00
Marko Mäkelä
72eea39d4c MDEV-23991 fixup: Initialize the memory
This regression was introduced in
commit afc9d00c66.
This is a partial backport of
commit 199863d72b from 10.4.
2020-10-30 12:58:16 +02:00
Oleksandr Byelkin
2e5450af05 Merge branch '10.1' into 10.2 2020-10-29 15:16:53 +01:00
Sergei Golubchik
d6302c9a47 MDEV-23702 calculating(auto rounding) issue
Implement a different fix for
"MDEV-19232: Floating point precision / value comparison problem"

Instead of truncating decimal values after every division,
truncate them for comparison purposes.

This reverts commit 62d73df6b2 but keeps the test.
2020-10-29 09:27:56 +01:00
Oleksandr Byelkin
65e26bc1ba Merge branch '10.1' into 10.2 2020-10-28 10:56:38 +01:00
Marko Mäkelä
cc5f4428b8 MDEV-23693 fixup: Remove unused btr_search_t::withdraw_clock 2020-10-28 08:13:06 +02:00