1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fixed main.flush_read_lock sporadic failure

With MDEV-19384 fixed FTWRL releases HANDLER locks early, which allows
concurrent threads to go. Test case may get stuck on FTWRL waiting for
LOCK TABLES.
This commit is contained in:
Sergey Vojtovich
2019-05-13 17:56:31 +04:00
parent 341c3379ae
commit 7a6c36b547
3 changed files with 22 additions and 10 deletions

View File

@ -2100,6 +2100,7 @@ SET DEBUG_SYNC= 'RESET';
--echo # and DROP DATABASE
--echo #
SET DEBUG_SYNC= 'ftwrl_before_lock SIGNAL ready WAIT_FOR go';
CREATE DATABASE mysqltest;
CREATE TABLE mysqltest.t1(a INT);
HANDLER mysqltest.t1 OPEN as t1;
@ -2114,18 +2115,24 @@ SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready';
connect (con3,localhost,root,,);
SET DEBUG_SYNC= 'now WAIT_FOR ready';
disconnect con3;
connection default;
FLUSH TABLES WITH READ LOCK;
UNLOCK TABLES;
HANDLER t1 CLOSE;
connection con1;
send FLUSH TABLES WITH READ LOCK;
connection con3;
SET DEBUG_SYNC= 'now WAIT_FOR ready';
disconnect con3;
connection con1;
--error 0,ER_NO_SUCH_TABLE
reap;
UNLOCK TABLES;
SET DEBUG_SYNC= 'now SIGNAL go';
disconnect con1;
connection default;
reap;
UNLOCK TABLES;
HANDLER t1 CLOSE;
connection con2;
reap;
disconnect con2;