Commit graph

184047 commits

Author SHA1 Message Date
Olivier Bertrand
24c18ce892 - Fix json parser (void objects not recognized) modified: json.cpp 2020-12-18 18:59:52 +01:00
Olivier Bertrand
a786741000 - Fix crash with JsonContains UDF + BSON development 2020-12-17 13:58:13 +01:00
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
a526965c61 delete bld2 2020-11-20 12:46:25 +01:00
Olivier Bertrand
eb21ac65c1 ??? 2020-11-20 11:43:39 +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
da10bf2d56 remove large file 2020-11-18 16:10:23 +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
Oleksandr Byelkin
c8be6aafb9 Fix to make it compiling on new ubuntu. 2020-11-14 09:55:09 +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
Igor Babaev
190e8a4c2a MDEV-23619 MariaDB crash on WITH RECURSIVE UNION ALL (CTE) query
Due to a premature cleanup of the unit that specified a recursive CTE
used in the second operand of union the server fell into an infinite
loop in the reported test case. In other cases this premature cleanup
could cause other problems.
The bug is the result of a not quite correct fix for MDEV-17024. The
unit that specifies a recursive CTE has to be cleaned only after the
cleanup of the last external reference to this CTE. It means that
cleanups of the unit triggered not by the cleanup of a external
reference to the CTE must be blocked.
Usage of local table chains in selects to get external references to
recursive CTEs was not correct either because of possible merges of
some selects.

Also fixed a minor bug in st_select_lex::set_explain_type() that caused
typing 'RECURSIVE UNION' instead of 'UNION' in EXPLAIN output for external
references to a recursive CTE.
2020-11-13 08:07:20 -08:00
Sujatha
984a06db2c MDEV-4633: multi_source.simple test fails sporadically
Analysis:
========
Writes to 'rli->log_space_total' needs to be synchronized, otherwise both
SQL_THREAD and IO_THREAD can try to modify the variable simultaneously
resulting in incorrect rli->log_space_total.  In the current test scenario
SQL_THREAD is trying to decrement 'rli->log_space_total' in 'purge_first_log'
and IO_THREAD is trying to increment the 'rli->log_space_total' in
'queue_event' simultaneously. Hence test occasionally fails with  result
mismatch.

Fix:
===
Convert 'rli->log_space_total' variable to atomic type.
2020-11-12 13:04:39 +05:30
Olivier Bertrand
17ea1efe0a Fix using a null pointer. modified storage/connect/tabrest.cpp 2020-11-11 17:41:11 +01:00
Marko Mäkelä
dd33a70dad Merge mariadb-10.2.36 into 10.2 2020-11-11 18:31:42 +02:00
Daniel Bartholomew
15550ed3a4
bump the VERSION 2020-11-11 10:17:22 -05: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
Anel Husakovic
cd927dd345 MDEV-23769: MTR can abort before it prints the test result summary
- Patch is solving generating report on warning
        To repeat the error run single worker:
        ```
        ./mtr --mysqld=--lock-wait-timeout=-xx 1st 1st --force --parallel 1
        ```
        or `N` workers with `N+1` tests with failures and `force`
        ```
        ./mtr --mysqld=--lock-wait-timeout=-xx 1st 1st grant5 --force --parallel 2
        ```
- Patch is doing cosmetic fix of `current_test` log file which holds the old log value of test `CURRENT TEST:..` in `mark_log()` in case of `unknown option` and as such
  the logic which is using it's content doesn't output valid log content and doesn't generate valid `$test->{'comment'}` message.asdf

- Closing the socket/handler after the removing the handler from IO for
consistency

Reviewed by: serg@mariadb.com
2020-11-10 21:20:44 +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
Igor Babaev
bea84aefb0 MDEV-23811: With large number of indexes optimizer chooses an inefficient plan
This bug could manifest itself for a query with WHERE condition containing
top level OR formula such that each conjunct contained a single-range
condition supported by the same index. One of these range conditions must
be fully covered by another range condition that is used later in the OR
formula. Additionally at least one of these condition should be ANDed with
a sargable range condition supported by a different index.

There were several attempts to fix related problems for OR conditions after
the backport of range optimizer code from MySQL (commit
0e19f3e36f). Unfortunately the first of these
fixes contained typo remained unnoticed until recently. This typo bug led
to rejection of valid range accesses. This patch fixed this typo bug.
The fix revealed another two bugs: one in a constructor for SEL_ARG,
the other in the function tree_or(). Both are fixed in this patch.
2020-11-09 13:51:32 -08:00
Sergei Petrunia
1404f3bea7 MDEV-24117: Memory management problem ...: Add a testcase
Add a testcase.
2020-11-09 19:29:34 +03:00
Sergei Petrunia
f81eef62e7 MDEV-24117: Memory management problem in statistics state for ... IN
Part#1: Revert the patch that caused it:

commit 291be49474
Author: Igor Babaev <igor@askmonty.org>
Date:   Thu Sep 24 22:02:00 2020 -0700

    MDEV-23811: With large number of indexes optimizer chooses an inefficient plan
2020-11-09 19:29:21 +03: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