Commit graph

191327 commits

Author SHA1 Message Date
Jan Lindström
0bde52e6a8 MDEV-24164 : Galera test failure on galera_fk_cascade_delete
Add wait_conditions.
2020-11-17 08:36:38 +02:00
Daniel Black
7f30a5c423 MDEV-24125: allow compile on Linux headers < 3.8
This allows MariaDB to compile on old (limits to >2.6.32)
linux kernel versions.

This warns that attempts to use large pages will rely on
implict kernel determination.
2020-11-17 07:53:55 +11:00
Daniel Black
8cc5d2845c MDEV-24125: linux large pages - Revert "Fixed centos 6 build failure"
This reverts commit 6cf8f05fd9.

Original patch assumed that MAP_HUGETLB as consistent across
achitectures which isn't the case. Defining it unconditionally
broke large pages on every achitecutre where the value differed
from x86_64.

With the EOL for Centos/RHEL6 announced in 10.5.7, <3.8 linux
kernels are no longer supported.
2020-11-17 07:53:55 +11:00
Daniel Black
0fc0eb1e5b MDEV-24124: main.drop test - mulitarch/os error messages
Account for variety of mips, hppa, solaris and other messages.

Copied from rpl.rpl_drop_db test.
2020-11-17 07:41:57 +11:00
Monty
eae9311fa2 Do not run maria.repair with --embedded as memory usage is different 2020-11-16 13:23:39 +02:00
Daniele Sciascia
1ae7809a7c Restore autoincrement offset in MTR test MDEV-24063 2020-11-16 12:32:08 +02:00
Sujatha
2b347e9fc5 MDEV-23610: Slave user can't run "SHOW SLAVE STATUS" anymore after upgrade to 10.5, mysql_upgrade should take of that
Fixing a post push test issue.
2020-11-16 14:49:46 +05:30
Sujatha
6da68049b5 MDEV-23610: Slave user can't run "SHOW SLAVE STATUS" anymore after upgrade to 10.5, mysql_upgrade should take of that
Add a new privilege "SLAVE MONITOR" which will grant user the permission
to execute "SHOW SLAVE STATUS" and "SHOW RELAYLOG EVENTS" commands.

SHOW SLAVE STATUS requires either SLAVE MONITOR/SUPER
SHOW RELAYLOG EVENTS requires SLAVE MONITOR privilege.
2020-11-16 14:31:44 +05:30
Daniel Black
9b30212f15 MDEV-24161: shortcut OQGRAPH dependency checks if disabled
Reviewer: Brad Smith
2020-11-16 09:47:19 +11:00
Roman Nozdrin
1edd224372 This patch puts MCS debian packaging files and part of debian/control
into the engine directory
2020-11-14 19:09:34 +00:00
Oleksandr Byelkin
81b9c78500 MDEV-24098: 10.5 followup
remove version data from the test output
2020-11-14 12:28:28 +01:00
Oleksandr Byelkin
6daf6bbcfe Merge branch '10.4' into 10.5 2020-11-14 10:15:54 +01:00
Oleksandr Byelkin
1bebc8de5d Merge branch '10.3' into 10.4 2020-11-14 10:05:23 +01:00
Oleksandr Byelkin
a00e21c03d Merge branch '10.2' into 10.3 2020-11-14 09:57:22 +01:00
Oleksandr Byelkin
c8be6aafb9 Fix to make it compiling on new ubuntu. 2020-11-14 09:55:09 +01:00
Marko Mäkelä
e8f8992801 MDEV-24188: Merge 10.4 into 10.5 2020-11-13 22:06:50 +02:00
Marko Mäkelä
ca331bdcda MDEV-23619: Merge 10.4 into 10.5 2020-11-13 22:06:05 +02:00
Marko Mäkelä
d7a5824899 Merge 10.4 into 10.5 2020-11-13 21:54:21 +02:00
Marko Mäkelä
749ecedfec MDEV-24188: Merge 10.3 into 10.4 2020-11-13 20:45:28 +02:00
Marko Mäkelä
b63dc3f370 MDEV-23619: Merge 10.3 into 10.4 2020-11-13 20:43:54 +02:00
Marko Mäkelä
f9f2f37495 MDEV-24188: Merge 10.2 into 10.3 2020-11-13 20:41:48 +02:00
Marko Mäkelä
6fed6de93f MDEV-23619: Merge 10.2 into 10.3 2020-11-13 20:41:07 +02: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
b2029c0300 Merge branch '10.3' into 10.4 2020-11-12 15:39:02 +05:30
Marko Mäkelä
972dc6ee98 Merge 10.3 into 10.4 2020-11-12 11:18:04 +02:00
Sujatha
bafb011a82 Merge branch '10.2' into 10.3 2020-11-12 14:10:05 +05:30
Marko Mäkelä
150f447af1 Merge 10.2 into 10.3 2020-11-12 10:37:21 +02: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
Marko Mäkelä
97569d3c37 MDEV-24196 WITH_UBSAN: member call on null pointer of log_phys_t
MDEV-12353 deliberately tries to avoid memory alignment overhead in
log_phys_t, storing the stream of log records bytes straight after
a header object. But, offsetof() is not allowed on C++ data objects,
and neither are attempts to emulate it by invoking a member function
on a null pointer.

log_phys_t::len: Remove. Make it part of the byte stream that
immediately follow the object. Thanks to Eugene Kosov for this idea.

log_phys_t::start(): The start address of the following byte stream.

log_phys_t::len(): Compute len.

log_phys_t::alloc_size(): Use a simple sizeof calculation.
2020-11-12 07:31:17 +02:00
Marko Mäkelä
dd33a70dad Merge mariadb-10.2.36 into 10.2 2020-11-11 18:31:42 +02:00
Marko Mäkelä
340feb01e4 Merge mariadb-10.3.27 into 10.3 2020-11-11 18:30:27 +02:00
sjaakola
2fbcddbeaf MDEV-24119 MDL BF-BF Conflict caused by TRUNCATE TABLE
A follow-up fix, for original fix for MDEV-21577, which did not handle well
temporary tables.

OPTIMIZE and REPAIR TABLE statements can take a list of tables as argument,
and some of the tables may be temporary. Proper handling of temporary tables
is to skip them and continue working on the real tables. The bad version, skipped all tables,
if a single temporary table was in the argument list. And this resulted so that FK parent
tables were not scnanned for the remaining real tables. Some mtr tests, using OPTIMIZE or REPAIR
for temporary tables caused regressions bacause of this, e.g. galera.galera_optimize_analyze_multi

The fix in this PR opens temporary and real tables first, and in the table handling loop skips
temporary tables, FK parent scanning is done only for real tables.

The test has new scenario for OPTIMIZE and REPAIR issued for two tables of which one is temporary table.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2020-11-11 17:46:50 +02:00
sjaakola
ad432ef4c0 MDEV-24119 MDL BF-BF Conflict caused by TRUNCATE TABLE
This PR fixes same issue as MDEV-21577 for TRUNCATE TABLE.
MDEV-21577 fixed TOI replication for OPTIMIZE, REPAIR and ALTER TABLE
operating on FK child table. It was later found out that also TRUNCATE
has similar problem and needs a fix.

The actual fix is to do FK parent table lookup before TRUNCATE TOI
isolation and append found FK parent table names in certification key
list for the write set.

PR contains also new test scenario in galera_ddl_fk_conflict test where
FK child has two FK parent tables and there are two DML transactions operating
on both parent tables.

For development convenience, new TO isolation macro was added:
WSREP_TO_ISOLATION_BEGIN_IF and WSREP_TO_ISOLATION_BEGIN_ALTER macro was changed
to skip the goto statement.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2020-11-11 17:46:50 +02:00
Marko Mäkelä
b4a5ad8db5 Merge mariadb-10.5.8 into 10.5 2020-11-11 17:42:23 +02:00
Marko Mäkelä
99a9774754 Merge mariadb-10.4.17 into 10.4 2020-11-11 17:26:51 +02:00
Daniel Bartholomew
fff469db7f
bump the VERSION 2020-11-11 10:20:34 -05:00
Daniel Bartholomew
940db6abc8
bump the VERSION 2020-11-11 10:19:27 -05:00
Daniel Bartholomew
bafbfb5530
bump the VERSION 2020-11-11 10:18:33 -05: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
Marko Mäkelä
e9b3d44c6e MDEV-24190 Accessing INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION may break innodb_open_files logic
If the function i_s_tablespaces_encryption_fill_table() was not able to
report all content to the SQL layer, it would fail to decrement
fil_system.freeze_space_list that it had incremented. This would
prevent the not-frequently-used logic from working, potentially causing
frequently used files to be closed and reopened whenever innodb_open_files
is exceeded.

This regression was caused by
commit 45ed9dd957 (part of MDEV-23855).
2020-11-11 09:11:34 +02:00
Daniele Sciascia
83f3d12fcd Update wsrep-lib
Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2020-11-11 07:37:05 +02:00
Anel Husakovic
3bf726f5ff MDEV-24130: Cannot launch mariadbd via mysqld_safe
- Patch 95bb3cb886 used `my_which` function in `10.2`
- Based on patch `355ee6877bec` from 10.3+ `command -v` is used instead of
`my_which` so we are changing in this patch also
- `ldconfig` is usually found in `/sbin` so make sure it is added in
`$PATH` variable
2020-11-10 21:27:25 +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
Sergei Golubchik
7da6353b15 Merge branch '10.4' into 10.5 2020-11-10 14:09:05 +01:00
Vladislav Vaintroub
3a5cf14def MDEV-24175 Windows - fix detection of SSD 2020-11-10 13:24:45 +01:00
Marko Mäkelä
4e24b3187c MDEV-19951 followup: Remove unused st_handler_tablename, tablename_compare 2020-11-10 14:19:33 +02:00