1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

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.
This commit is contained in:
Jon Olav Hauglid
2009-12-10 15:09:56 +01:00
parent 8724320989
commit d7f9583a9b
2 changed files with 8 additions and 12 deletions

View File

@@ -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';

View File

@@ -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;