mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-23843 Assertions in Diagnostics_area upon table operations under FTWRL
2 different problems: - MYSQL_BIN_LOG::write() did not check if mdl_context.acquire_lock() failed - Sql_cmd_optimize_table::execute() and Sql_cmd_repair_table::execute() called write_bin_log(), which could fail if sql_admin() had already called my_eof() Fixed by adding check for aquire_lock() return status and protect write_bin_log() in the above two functions with set_overwrite_status().
This commit is contained in:
29
mysql-test/main/flush_and_binlog.test
Normal file
29
mysql-test/main/flush_and_binlog.test
Normal file
@ -0,0 +1,29 @@
|
||||
--source include/have_log_bin.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23843 Assertions in Diagnostics_area upon table operations under
|
||||
--echo # FTWRL
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
--connect (con1,localhost,root,,)
|
||||
SET lock_wait_timeout= 1;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
OPTIMIZE TABLE t1;
|
||||
# Cleanup
|
||||
--disconnect con1
|
||||
--connection default
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Second test case from MDEV_23843
|
||||
#
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
--connect (con1,localhost,root,,test)
|
||||
SET lock_wait_timeout= 1;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
FLUSH TABLES;
|
||||
--connection default
|
||||
--disconnect con1
|
||||
unlock tables;
|
Reference in New Issue
Block a user