Commit f797ba9e authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

Backport of revno: 3690

Postfix for Bug#48210 FLUSH TABLES WITH READ LOCK deadlocks
                      against concurrent CREATE PROCEDURE

Rewrote the second test to use DROP PROCEDURE instead of 
CREATE USER as CREATE USER does not work with embedded server.
parent 7696a241
......@@ -273,21 +273,19 @@ FLUSH TABLES WITH READ LOCK;
# Connection 2
UNLOCK TABLES;
# Connection 1
DROP PROCEDURE p1;
SET DEBUG_SYNC= 'RESET';
# Test 2: CREATE USER
# Start CREATE USER and open the grant tables
# Test 2: DROP PROCEDURE
# Start DROP PROCEDURE and open tables
SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait';
CREATE USER 'user_1@localhost';
DROP PROCEDURE p1;
# Connection 2
SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
# Check that FLUSH must wait to get the GRL
# and let CREATE USER continue
# and let DROP PROCEDURE continue
SET DEBUG_SYNC= 'wait_lock_global_read_lock SIGNAL grlwait';
FLUSH TABLES WITH READ LOCK;
# Connection 1
# Connection 2
UNLOCK TABLES;
# Connection 1
DROP USER 'user_1@localhost';
SET DEBUG_SYNC= 'RESET';
......@@ -509,21 +509,20 @@ UNLOCK TABLES;
--echo # Connection 1
connection default;
DROP PROCEDURE p1;
SET DEBUG_SYNC= 'RESET';
--echo # Test 2: CREATE USER
--echo # Test 2: DROP PROCEDURE
connection default;
--echo # Start CREATE USER and open the grant tables
--echo # Start DROP PROCEDURE and open tables
SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait';
--send CREATE USER 'user_1@localhost'
--send DROP PROCEDURE p1
--echo # Connection 2
connection con2;
SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
--echo # Check that FLUSH must wait to get the GRL
--echo # and let CREATE USER continue
--echo # and let DROP PROCEDURE continue
SET DEBUG_SYNC= 'wait_lock_global_read_lock SIGNAL grlwait';
--send FLUSH TABLES WITH READ LOCK
......@@ -538,7 +537,6 @@ UNLOCK TABLES;
--echo # Connection 1
connection default;
DROP USER 'user_1@localhost';
SET DEBUG_SYNC= 'RESET';
disconnect con2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment