mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-12620 - set lock_wait_timeout = 1;flush tables with read lock;
lock not released after timeout Release GRL if FLUSH TABLES phase failed.
This commit is contained in:
@ -3100,3 +3100,18 @@ a
|
||||
# Connection default
|
||||
DROP TABLE m1, t1, t2;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
#
|
||||
# MDEV-12620 - set lock_wait_timeout = 1;flush tables with read lock;
|
||||
# lock not released after timeout
|
||||
#
|
||||
CREATE TABLE t1(a INT) ENGINE=InnoDB;
|
||||
SET debug_sync='open_tables_after_open_and_process_table SIGNAL ready WAIT_FOR go';
|
||||
SELECT * FROM t1;
|
||||
SET debug_sync='now WAIT_FOR ready';
|
||||
SET lock_wait_timeout=1;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
SET debug_sync='now SIGNAL go';
|
||||
a
|
||||
SET debug_sync='RESET';
|
||||
DROP TABLE t1;
|
||||
|
@ -4806,6 +4806,30 @@ disconnect con2;
|
||||
disconnect con3;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-12620 - set lock_wait_timeout = 1;flush tables with read lock;
|
||||
--echo # lock not released after timeout
|
||||
--echo #
|
||||
CREATE TABLE t1(a INT) ENGINE=InnoDB;
|
||||
SET debug_sync='open_tables_after_open_and_process_table SIGNAL ready WAIT_FOR go';
|
||||
send SELECT * FROM t1;
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
SET debug_sync='now WAIT_FOR ready';
|
||||
# lock_wait_timeout should be 0 in 10.3, so that we don't have to wait at all
|
||||
SET lock_wait_timeout=1;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
SET debug_sync='now SIGNAL go';
|
||||
|
||||
connection default;
|
||||
reap;
|
||||
SET debug_sync='RESET';
|
||||
DROP TABLE t1;
|
||||
|
||||
disconnect con1;
|
||||
|
||||
|
||||
# Check that all connections opened by test cases in this file are really
|
||||
# gone so execution of other tests won't be affected by their presence.
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@ -253,7 +253,8 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
|
||||
NOTE: my_error() has been already called by reopen_tables() within
|
||||
close_cached_tables().
|
||||
*/
|
||||
result= 1;
|
||||
thd->global_read_lock.unlock_global_read_lock(thd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (thd->global_read_lock.make_global_read_lock_block_commit(thd)) // Killed
|
||||
|
Reference in New Issue
Block a user