- 06 Oct, 2020 2 commits
-
-
Jan Lindström authored
MDEV-18593 : galera.galera_gcache_recover_full_gcache: Test failure: galera_gcache_recover_full_gcache.test: assert_grep.inc failed Grep only the fact that we need to fall back to SST.
-
Marko Mäkelä authored
In MDEV-21452, SAFE_MUTEX flagged an ordering problem that involved trx_t::mutex, LOCK_global_system_variables, and LOCK_commit_ordered when running ./mtr --no-reorder\ binlog.binlog_checksum,mix binlog.binlog_commit_wait,mix Because LOCK_commit_ordered is acquired by replication code before innobase_commit_ordered() is invoked, and because LOCK_commit_ordered should be below LOCK_global_system_variables in the global latching order, it turns out that we must avoid acquiring LOCK_global_system_variables in any low-level code. It also turns out that lock_rec_lock() acquires lock_sys_t::mutex and then carries on to call lock_rec_enqueue_waiting(), which may invoke THDVAR() via thd_lock_wait_timeout(). This call is problematic if THDVAR() had never been invoked in that thread earlier. innobase_trx_init(): Let us invoke THDVAR() at the start of an InnoDB transaction so that future invocations of THDVAR() will avoid LOCK_global_system_variables acquisition on the same THD. Because the first call to intern_sys_var_ptr() will initialize all session variables by not passing the offset to sync_dynamic_session_variables(), this will indeed make any future THDVAR() invocation mutex-free. There are some THDVAR() calls in other code (related to indexed virtual columns, fulltext indexes, and DDL operations). No SAFE_MUTEX warning was known for those, but there does not appear to be any replication test coverage for indexed virtual columns or fulltext indexes. DDL should be covered, and perhaps DDL code paths were already invoking THDVAR() while not holding any InnoDB mutex. Side note: MySQL should avoid this type of deadlocks since mysql/mysql-server@4d275c89954685e2ed1b368812b3b5a29ddf9389. MariaDB never defined alloc_and_copy_thd_dynamic_variables(), because we prefer to avoid overhead during connection creation. An important part of the deadlock could be the current handling of SET GLOBAL binlog_checksum=NONE; and similar assignments. In binlog_checksum_update(), we would hold LOCK_global_system_variables while potentially acquiring LOCK_commit_ordered in MYSQL_BIN_LOG::open(). Even if that code was changed later to release LOCK_global_system_variables during the write to mysql_bin_log, it could be a good idea for performance to avoid invoking the expensive code path of THDVAR() while holding any InnoDB mutexes, such as lock_sys.mutex in lock_rec_enqueue_waiting(). Thanks to Andrei Elkin for debugging the SAFE_MUTEX issue, and to Sergei Golubchik for the suggestion to invoke THDVAR() early.
-
- 05 Oct, 2020 4 commits
-
-
Eugene Kosov authored
-
Jan Lindström authored
Changes to be committed: modified: mysql-test/suite/sys_vars/r/wsrep_cluster_address_basic.result modified: mysql-test/suite/sys_vars/t/wsrep_cluster_address_basic.test
-
Marko Mäkelä authored
The setting innodb_lock_schedule_algorithm=VATS that was introduced in MDEV-11039 (commit 021212b5) causes conflicting exclusive locks to be incorrectly granted to two transactions. Specifically, in lock_rec_insert_by_trx_age() the predicate !lock_rec_has_to_wait_in_queue(in_lock) would hold even though an active transaction is already holding an exclusive lock. This was observed between two DELETE of the same clustered index record. The HASH_DELETE invocation in lock_rec_enqueue_waiting() may be related. Due to lack of progress in diagnosing the problem, we will deprecate the option and issue a warning that using it may corrupt data. The unsafe option was enabled between commit 0c15d1a6 (MariaDB 10.2.3) and the parent of commit 1cc1d042 (MariaDB 10.2.17, 10.3.9).
-
Marko Mäkelä authored
SYNC_REC_LOCK was never used in the public history of InnoDB, starting with commit 132e667b.
-
- 03 Oct, 2020 1 commit
-
-
Eugene Kosov authored
-
- 02 Oct, 2020 3 commits
-
-
Vladislav Vaintroub authored
Amend check for unread client data in threadpool. THD::NET will have unread data, in case client uses compression, and wraps multiple commands into a single compression packet MariaDB C/C sends COM_STMT_RESET+COM_STMT_EXECUTE, and wraps it into a single compressed packet, when compression is on, thus trying to use compression and prepared statements against a threadpool-enabled server will result into a hang, before this patch.
-
Marko Mäkelä authored
The orphan declaration was added in MySQL 5.6.2 mysql/mysql-server@2915417e026ef9fdd8e36df17938409ccc157d86 and MariaDB commit 1d0f70c2.
-
Marko Mäkelä authored
The unused fts_t::bg_threads was added in mysql/mysql-server@4b1049625c00dbfcd9d7a11ad12a84695ab747e3. Any usage of fts_t::bg_threads_mutex was removed in mysql/mysql-server@33c2404b397e1077daaf0ef0ff9edba445430f5f.
-
- 30 Sep, 2020 2 commits
-
-
Thirunarayanan Balathandayuthapani authored
In fts_optimize_remove_table(), InnoDB tries to access the fts_optimize_wq after shutting down the fts optimize thread. This issue caused by the commit a41d4297. Fix should check for fts optimize thread shutdown state before checking fts_optimize_wq.
-
Marko Mäkelä authored
This has been unused from the very beginning (mysql/mysql-server@d5e512ae7e37cd1f70c44a3f12205d70b13118ab).
-
- 29 Sep, 2020 4 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
ibuf_merge_or_delete_for_page(): Do not attempt to invoke ibuf_delete_recs() on a page of the change buffer itself. The caller could already be holding ibuf->index->lock, and an attempt to acquire it in S mode would hang the release server or cause an assertion failure in rw_lock_s_lock_func() in a debug server. This problem was reproducible on 1 out of 2 runs of the following: ./mtr --no-reorder \ innodb.innodb-page_compression_default \ innodb.innodb-page_compression_snappy \ innodb.innodb-page_compression_zip \ innodb.innodb_wl6326_big innodb.xa_recovery
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This was missed in commit 2c252ba9 (MySQL 5.5.42, MariaDB 5.5.42).
-
- 28 Sep, 2020 5 commits
-
-
Jan Lindström authored
Fix typo.
-
Thirunarayanan Balathandayuthapani authored
MDEV-22277 LeakSanitizer: detected memory leaks in mem_heap_create_block_func after attempt to create foreign key - During online DDL, prepare phase error handler fails to remove the memory allocated for newly created foreign keys.
-
Sujatha authored
-
Jan Lindström authored
This will update galera_3nodes/disabled.def.
-
Sujatha authored
MDEV-22330: mysqlbinlog stops with an error Don't know how to handle column type: 255 meta: 4 (0004) Analysis: ======== "mysqlbinlog -v" option will reconstruct row events and display them as commented SQL statements. If this option is given twice, the output includes comments to indicate column data types and some metadata. `log_event_print_value` is the function reponsible for printing values and their types. This function doesn't handle GEOMETRY type. Hence the above error gets printed. Fix: === Add support for GEOMETRY datatype.
-
- 25 Sep, 2020 1 commit
-
-
Monty authored
The original code was correct. mysql_upgrade calls the mysql client to talk with MariaDB. It doesn't call itself!
-
- 24 Sep, 2020 1 commit
-
-
Daniel Black authored
Appoligies, had a dirty branch before pushing: This reverts commit 053653a2. This reverts commit 0ff89780. This reverts commit 85b08597. This reverts commit f3f45e46. This reverts commit a470b357. This reverts commit f8b8d202. This reverts commit 6b6f066f. This reverts commit a701e9e6. This reverts commit c1698386.
-
- 23 Sep, 2020 7 commits
-
-
Daniel Black authored
-
Daniel Black authored
Leave debian/additions/mysqlreport as #!/usr/bin/perl Acknowledge that `env perl` is a hack, a complete fix needs to consider which path perl is at and insert into these scripts. The usefulness of these scripts is questionable.
-
-
Marko Mäkelä authored
Passing a null pointer to a nonnull argument is not only undefined behaviour, but it also grants the compiler the permission to optimize away further checks whether the pointer is null. GCC -O2 at least starting with version 8 may do that, potentially causing SIGSEGV.
-
Marko Mäkelä authored
Shifting a 16-bit type by 16 bits is undefined behaviour. The result is at least 32 bits, so let us cast the shift operand to a wider type before shifting.
-
Marko Mäkelä authored
For some reason, adding -fsanitize=undefined (cmake -DWITH_UBSAN=ON) to the compilation flags will cause even more warnings to be emitted. The warnings do look bogus, but the code can be simplified.
-
Marko Mäkelä authored
For some reason, adding -fsanitize=undefined (cmake -DWITH_UBSAN=ON) to the compilation flags will cause even more warnings to be emitted. The warning was a bogus one: tests/mysql_client_test.c:8632:22: error: '%d' directive writing between 1 and 11 bytes into a region of size 9 [-Werror=format-overflow=] 8632 | sprintf(field, "c%d int", i); | ^~ tests/mysql_client_test.c:8632:20: note: directive argument in the range [-2147483648, 999] The warning does not take into account that the lower bound of the variable actually is 0. But, we can help the compiler and use an unsigned variable.
-
- 22 Sep, 2020 9 commits
-
-
Oleksandr Byelkin authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
It turns out that we must check for DISCARD TABLESPACE both when the table is being rebuilt and when the AUTO_INCREMENT value of the table is being added. This was caught by the test innodb.alter_missing_tablespace. Somehow I failed to run all tests. Sorry!
-
Marko Mäkelä authored
The statement ALTER TABLE...DISCARD TABLESPACE is problematic, because its designed purpose is to break the referential integrity of the data dictionary and make a table point to nowhere. ha_innobase::commit_inplace_alter_table(): Check whether the table has been discarded. (This is a bit late to check it, right before committing the change.) Previously, we performed this check only in a specific branch of the function commit_set_autoinc(). Note: We intentionally allow non-rebuilding ALTER TABLE even if the tablespace has been discarded, to remain compatible with MySQL. (See the various tests with "wl5522" in the name, such as innodb.innodb-wl5522.) The test case would crash starting with 10.3 only, but it does not hurt to minimize the code and test difference between 10.2 and 10.3.
-
Marko Mäkelä authored
dict_load_table_low(): Copy the 'discarded' flag to file_unreadable. This allows to avoid a potentially harmful call to dict_stats_init() in ha_innobase::open().
-
Marko Mäkelä authored
The test that was added in commit e05650e6 would break a subsequent run of a test encryption.innodb-bad-key-change because some pages in the system tablespace would be encrypted with a different key. The failure was repeatable with the following invocation: ./mtr --no-reorder \ encryption.create_or_replace,cbc \ encryption.innodb-bad-key-change,cbc Because the crash was unrelated to the code changes that we reverted in commit eb38b1f7 we can safely re-apply those fixes.
-
Marko Mäkelä authored
After DISCARD TABLESPACE, the tablespace of a table will no longer exist, and dict_get_and_save_data_dir_path() would invoke dict_get_first_path() to read an entry from SYS_DATAFILES. For some reason, DISCARD TABLESPACE would not to remove the entry from there. dict_get_and_save_data_dir_path(): If the tablespace has been discarded, do not bother trying to read the name. Side note: The tables SYS_TABLESPACES and SYS_DATAFILES are redundant and subject to removal in MDEV-22343.
-
Marko Mäkelä authored
This reverts commit e33f7b6f. The change seems to have introduced intermittent failures of the test encryption.innodb-bad-key-change on many platforms. The failure that we were trying to address was not reproduced on 10.2. It could be related to commit a7dd7c89 (MDEV-23651) or de942c9f (MDEV-15983) or other changes that reduced contention on fil_system.mutex in 10.3. The fix that we are hereby reverting from 10.2 seems to work fine on 10.3 and 10.4.
-
Daniel Black authored
This is just to make sure no ExecStartPre/Post actions from the multi-instance MariaDB service definition are executed when a user attempts to start mariadb@bootstrap. Fixes: 3723c70a
-
- 21 Sep, 2020 1 commit
-
-
Marko Mäkelä authored
This was forgotten in commit a9d8f5c1.
-