Commit graph

187250 commits

Author SHA1 Message Date
Marko Mäkelä
6801f80afa MDEV-19457 sys_vars.wsrep_provider_basic failed
wsrep_init_provider_status_variables(): Always set wsrep_inited
to ensure that the memory will be freed.

The initial patch was provided by Julius Goryavsky.
2019-11-01 15:19:13 +02:00
Monty
366f4f299e Fix that BACKUP STAGE BLOCK_COMMIT flushes binary log 2019-11-01 10:22:30 +02:00
Sergei Petrunia
fcd65b0376 MDEV-17171: RocksDB Tables do not have "Creation Date"
Variant#5 of the patch:
- take creation date from the .frm file, like InnoDB does
- Update_time is in-memory only (like in InnoDB).
2019-10-31 19:45:25 +03:00
Sergei Petrunia
eafc9d8516 MDEV-17171: RocksDB Tables do not have "Creation Date"
Temporarily revert the patch
2019-10-31 19:45:25 +03:00
Roman Nozdrin
ad8266a5c2 MDEV-20732 MDB now correctly estimates a length of the FORMAT() result for
doubles in scientific notation with a big integer part.
2019-10-31 02:26:04 -05:00
Sergei Golubchik
6535827885 MDEV-19516 mysql_secure_installation doesn't set password_last_changed while setting password for root 2019-10-30 15:24:00 +01:00
Daniele Sciascia
f4ba775914 MDEV-17099 Preliminary changes for Galera XA support (#1404)
Redo changes reverted in commit
8f46e3833c, this time without build
issues in wsrep-lib.
2019-10-30 10:45:22 +02:00
Marko Mäkelä
576c96a938 MDEV-20917: Fix dict_table_t::instant_column()
This is the only 10.4-specific fix. The remaining known issues
will be fixed by merging commit bef843b97f
from 10.3.
2019-10-29 19:14:05 +02:00
Marko Mäkelä
d4e1fa39f0 Use C++11 "range for" in crash recovery code 2019-10-29 11:58:11 +02:00
Sergei Golubchik
dadc53ff0b MDEV-19882 pam v2: auth_pam_tool truncates passwords that are not null-terminated
Don't assume that passwords (and other conv replies) are zero-terminated.
If they are, though, strndup() down below will take care of that.
2019-10-28 19:45:43 +01:00
Marko Mäkelä
d67ea8151f Rename LOG_HEADER_FORMAT_ to log_t::FORMAT_ 2019-10-28 16:16:57 +02:00
Marko Mäkelä
8f46e3833c Revert MDEV-17099 Preliminary changes for Galera XA support (#1401)
This reverts commit 2b5f4b3ed6
due to build failures.
2019-10-28 16:16:21 +02:00
Jan Lindström
9afbb1069a Add wait_condition to stabilize. 2019-10-25 12:32:11 +03:00
Daniele Sciascia
2b5f4b3ed6 MDEV-17099 Preliminary changes for Galera XA support (#1401)
Update wsrep-lib, and adapt to wsrep-lib interface changes.
2019-10-24 14:05:32 +03:00
Jan Lindström
82f22d2f25 MDEV-18590 galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
Ignore warning.
2019-10-23 10:12:53 +03:00
Jan Lindström
1036886b70 Stabilize tests.
Changes to be committed:
	modified:   mysql-test/suite/galera_sr/disabled.def
	modified:   mysql-test/suite/galera_sr/r/GCF-561.result
	modified:   mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result
	modified:   mysql-test/suite/galera_sr/r/galera_sr_kill_query.result
	modified:   mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result
	new file:   mysql-test/suite/galera_sr/suite.pm
	modified:   mysql-test/suite/galera_sr/t/GCF-561.test
	modified:   mysql-test/suite/galera_sr/t/galera_sr_ddl_master.test
	modified:   mysql-test/suite/galera_sr/t/galera_sr_kill_query.test
	modified:   mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test
2019-10-23 10:12:53 +03:00
Monty
9c735784ae Ensure that full_crc32_import doesn't fail
Test should die if innodb_compression_algorithm=3 doesn't exists
2019-10-20 15:48:20 +03:00
Monty
c2e0a0b175 Server crashes with BACKUP STAGE and FLUSH TABLE table_name
Fixes MDEV-18067, MDEV-18068 and MDEV-18069

The problem was that FLUSH TABLES table_name combined with UNLOCK TABLES
calls MDL_context::set_transaction_duration_for_all_locks(), which
changed backup_locks from MDL_EXPLICT to MDL_TRANSACTION.

Fixed by ensuring that set_transaction_duration_for_all_locks() doesn't
touch BACKUP locks.
2019-10-20 14:46:38 +03:00
Oleksandr Byelkin
5b6b16636d MDEV-20730: Syntax error on SELECT INTO @variable with CTE
added forgotem WITH option to spacial case with INTO
2019-10-17 23:20:34 +02:00
seppo
421d52e896 MDEV-6860 Parallel async replication hangs (#1400)
Instrumenting parallel slave worker thread with wsrep replication hooks.
Added mtr test for testing parallel slave support.
The test is based on the test attached in MDEV-6860 jira tracker.
2019-10-16 07:51:36 +03:00
Marko Mäkelä
899c843f11 Merge 10.3 into 10.4 2019-10-12 22:03:31 +03:00
Marko Mäkelä
fa6c606257 MDEV-20814 Assertion index->is_instant() failed on trivial upgrade from 10.1
rec_init_offsets(): Relax the assertion that was added in
commit 01f45becd1
to catch ROW_FORMAT=REDUNDANT records that have fewer fields
than expected.

This assertion would fail when accessing the records of the
built-in InnoDB table SYS_INDEXES. The column MERGE_THRESHOLD
had been effectively instantly added in MariaDB Server 10.2
(and MySQL 5.7), but is_instant() does not hold for that index.
Relax the assertion, so that it will not fail in this case.
2019-10-12 21:58:34 +03:00
Marko Mäkelä
0a473de08d Null-merge 10.3 into 10.4 2019-10-12 15:47:20 +03:00
Marko Mäkelä
bb450b1fed Merge 10.2 into 10.3 2019-10-12 15:38:58 +03:00
Marko Mäkelä
361e8284f3 MDEV-20813 Assertion failure in buf_flush_init_for_writing() for innodb_immediate_scrub_data_uncompressed=ON
The assertion that was added in
commit c0c003beb4
to augment the fix of MDEV-20805 turns out to be invalid when
innodb_immediate_scrub_data_uncompressed is enabled.
In this mode, fsp_init_file_page() will be invoked on data pages
that have been freed, causing writes of almost-all-zero pages.

btr_page_free(): Adjust the comment.

buf_flush_init_for_writing(): Disable the assertion with a note
that it should be re-enabled in MDEV-15528.
2019-10-12 15:28:55 +03:00
Marko Mäkelä
dba743b653 Fix -Wunused-variable 2019-10-12 06:57:02 +03:00
Marko Mäkelä
55c75b6bb3 Merge 10.3 into 10.4 2019-10-12 06:50:12 +03:00
Marko Mäkelä
8e3d85e112 Merge 10.2 into 10.3 2019-10-12 06:34:09 +03:00
Marko Mäkelä
2227dec45e Merge 10.1 into 10.2 2019-10-12 06:10:41 +03:00
Julius Goryavsky
2ae02c295a MDEV-20728: /usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1
When the mysqld_multi script passes the --defaults-group-suffix
option to mysqld, it must remove the initial substring with the
group name ("mysqld") from option value, because otherwise substring
"mysqld" will be added to the group name and then the group name
will contain the word "mysqld" twice, which is wrong, because
mysqld itself adds the suffix received to the group name.
2019-10-12 01:41:43 +02:00
Julius Goryavsky
4ca0abe964 MDEV-20728: /usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1
When the mysqld_multi script passes the --defaults-group-suffix
option to mysqld, it must remove the initial substring with the
group name ("mysqld") from option value, because otherwise substring
"mysqld" will be added to the group name and then the group name
will contain the word "mysqld" twice, which is wrong, because
mysqld itself adds the suffix received to the group name.
2019-10-12 01:40:34 +02:00
Julius Goryavsky
0ecc85c5d9 MDEV-20728: /usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1
When the mysqld_multi script passes the --defaults-group-suffix
option to mysqld, it must remove the initial substring with the
group name ("mysqld") from option value, because otherwise substring
"mysqld" will be added to the group name and then the group name
will contain the word "mysqld" twice, which is wrong, because
mysqld itself adds the suffix received to the group name.
2019-10-12 01:38:46 +02:00
Julius Goryavsky
36824d2bef MDEV-20728: /usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1
When the mysqld_multi script passes the --defaults-group-suffix
option to mysqld, it must remove the initial substring with the
group name ("mysqld") from option value, because otherwise substring
"mysqld" will be added to the group name and then the group name
will contain the word "mysqld" twice, which is wrong, because
mysqld itself adds the suffix received to the group name.
2019-10-12 01:36:29 +02:00
Marko Mäkelä
38736928e7 Fix -std=c++98 -Wzero-length-array
This is another follow-up fix to
commit b393e2cb0c
which turned out to be still broken.

Replace the C++11 keyword 'constexpr' with #define.

debug_sync_t::str: Remove the zero-length array.
Replace sync->str with reinterpret_cast<char*>(&sync[1]).
2019-10-11 21:26:16 +03:00
Marko Mäkelä
1e1b53ccfd After-merge fix: Correct an assertion
During IMPORT TABLESPACE, we do invoke
buf_flush_init_for_writing() with block==NULL and newest_lsn!=0.
2019-10-11 21:24:48 +03:00
Marko Mäkelä
966d97b5f9 Merge 10.1 into 10.2 2019-10-11 18:38:18 +03:00
Marko Mäkelä
1fd1ef25c2 Fix CMAKE_BUILD_TYPE=Debug
Remove unused variables and type mismatch that was introduced
in commit b393e2cb0c

Also, fix a typo in the documentation of the parameter, and
update the test.
2019-10-11 18:36:08 +03:00
Marko Mäkelä
c0c003beb4 MDEV-20805 follow-up: Catch writes of bogus pages
buf_flush_init_for_writing(): Assert that FIL_PAGE_TYPE is set
except when creating a new data file with a dummy first page.

buf_dblwr_create(): Ensure that FIL_PAGE_TYPE on all pages
will be initialized. Reset buf_dblwr_being_created at the end.
2019-10-11 15:32:04 +03:00
Marko Mäkelä
cbfd6882f4 Merge 5.5 into 10.1 2019-10-11 15:19:55 +03:00
Marko Mäkelä
ea61b79694 MDEV-20805 ibuf_add_free_page() is not initializing FIL_PAGE_TYPE first
In the function recv_parse_or_apply_log_rec_body() there are debug checks
for validating the state of the page when redo log records are being
applied. Most notably, FIL_PAGE_TYPE should be set before anything else
is being written to the page.

ibuf_add_free_page(): Set FIL_PAGE_TYPE before performing any other changes.
2019-10-11 14:12:36 +03:00
Marko Mäkelä
4ebaf81360 MDEV-19455: Avoid SET DEBUG_DBUG='-d,...' construct
Apply the correct pattern for debug instrumentation:

SET @save_dbug=@@debug_dbug;
SET debug_dbug='+d,...';
...
SET debug_dbug=@save_dbug;

Numerous tests use statements of the form

SET debug_dbug='-d,...';

which will inadvertently enable all DBUG tracing output,
causing unnecessary waste of resources.
2019-10-11 14:02:35 +03:00
Marko Mäkelä
5ef1224434 MDEV-20804 Speed up main.index_merge_innodb
The test main.index_merge_innodb is taking very much time,
especially on later versions (10.2 and 10.3).

Some of this could be attributed to the use of INSERT...SELECT,
which is time-consumingly creating explicit record locks in InnoDB
for the locking read in the SELECT part.

In 10.3 and later, some slowness can be attributed to MDEV-12288,
which makes the InnoDB purge thread spend time to reset transaction
identifiers in the inserted records. If we prevent purge from
running before all tables are dropped, the test seems to be
10% faster on an unoptimized debug build on 10.5. (A proper fix
would be to implement MDEV-515 and stop writing row-level undo log
records for inserts into an empty table or partition.)

At the same time, it should not hurt to make main.index_merge_myisam
to use the sequence engine. Not only could it be a little faster,
but the test would be slightly more readable.
2019-10-11 12:29:12 +03:00
Nikita Malyavin
350e46a8b5 MDEV-18546 ASAN heap-use-after-free in innobase_get_computed_value / row_purge
the bug was already fixed in MDEV-17005, so now only test is added
2019-10-11 17:02:39 +10:00
Nikita Malyavin
b393e2cb0c add innodb_debug_sync var to support DEBUG_SYNC from purge threads 2019-10-11 17:02:39 +10:00
Marko Mäkelä
b05be3ef8c Add encryption.innodb-redo-badkey,strict_full_crc32
In commit 0f7732d1d1
we introduced a innodb_checksum_algorithm=full_crc32 combination
to a number of encryption tests, and also fixed the code accordingly.

The default in MariaDB 10.5 is innodb_checksum_algorithm=full_crc32.
In a test merge to 10.5, the test encryption.innodb-redo-badkey failed
once due to a message that had been added in that commit.

Let us introduce a full_crc32 option to that test.
And let us use strict_crc32 and strict_full_crc32 instead of the
non-strict variants, for the previously augmented tests, to be in
line with the earlier tests encryption.corrupted_during_recovery and
encryption.innodb_encrypt_temporary_tables.
2019-10-11 08:24:30 +03:00
Marko Mäkelä
09afd3da1a Merge 10.3 into 10.4 2019-10-10 21:30:40 +03:00
Marko Mäkelä
4cdb72f237 MDEV-19783: Relax an assertion
btr_page_get_split_rec_to_left(): Assert that in the leftmost leaf page,
if the metadata record exists, index->is_instant() must hold.
The assertion of commit 01f45becd1
could fail during innobase_instant_try().
2019-10-10 21:22:38 +03:00
Marko Mäkelä
01f45becd1 MDEV-19783: Add more assertions
btr_page_get_split_rec_to_left(): Assert that in the leftmost leaf page,
the metadata record exists if and only if index->is_instant().

page_validate(): Correct the wording of a message.

rec_init_offsets(): Assert that whenever a record is in "instant ALTER"
format, index->is_instant() must hold.
2019-10-10 20:40:26 +03:00
Marko Mäkelä
7f84e3ad75 Merge 10.2 into 10.3 2019-10-10 20:38:44 +03:00
Marko Mäkelä
6d7a826953 MDEV-20788: Bogus assertion failure for PAGE_FREE list
In MDEV-11369 (instant ADD COLUMN) in MariaDB Server 10.3,
we introduced the hidden metadata record that must be the
first record in the clustered index if and only if
index->is_instant() holds.

To catch MDEV-19783, in
commit ed0793e096 and
commit 99dc40d6ac
we added some assertions to find cases where
the metadata record is missing while it should not be, or a
record exists when it should not. Those assertions were invalid
when traversing the PAGE_FREE list. That list can contain anything;
we must only be able to determine the successor and the size of
each garbage record in it.

page_validate(), page_simple_validate_old(), page_simple_validate_new():
Do not invoke page_rec_get_next_const() for traversing the PAGE_FREE
list, but instead use a lower-level accessor that does not attempt to
validate the REC_INFO_MIN_REC_FLAG.

page_copy_rec_list_end_no_locks(),
page_copy_rec_list_start(), page_delete_rec_list_start():
Add assertions.

btr_page_get_split_rec_to_left(): Remove a redundant return value,
and make the output parameter the return value.

btr_page_get_split_rec_to_right(), btr_page_split_and_insert(): Clean up.
2019-10-10 20:29:30 +03:00