diff options
author | unknown <ingo@mysql.com> | 2006-06-10 12:24:44 +0200 |
---|---|---|
committer | unknown <ingo@mysql.com> | 2006-06-10 12:24:44 +0200 |
commit | 2dd1dc62462a9b7348d1c815acacddedb5a62d88 (patch) | |
tree | ecb80e61dc5f282b391823c7a37a6ee02753cada /mysql-test/t/lock_multi.test | |
parent | a74154f4de0b4f3765eb06932fb9ec3e79f764e0 (diff) | |
parent | 8efe592d58f657800c7c4e00f2c85815f7ae03d8 (diff) | |
download | mariadb-git-2dd1dc62462a9b7348d1c815acacddedb5a62d88.tar.gz |
Merge mysql.com:/home/mydev/mysql-5.0
into mysql.com:/home/mydev/mysql-5.0-amerge
mysql-test/r/lock_multi.result:
Merging 5.0-engines to 5.0 master.
mysql-test/t/lock_multi.test:
Merging 5.0-engines to 5.0 master.
Diffstat (limited to 'mysql-test/t/lock_multi.test')
-rw-r--r-- | mysql-test/t/lock_multi.test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test index 3c829848bf3..ee03088b8c3 100644 --- a/mysql-test/t/lock_multi.test +++ b/mysql-test/t/lock_multi.test @@ -109,6 +109,39 @@ unlock tables; drop table t1; # +# Bug#19815 - CREATE/RENAME/DROP DATABASE can deadlock on a global read lock +# +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); +# +connection con1; +CREATE DATABASE mysqltest_1; +FLUSH TABLES WITH READ LOCK; +# +# With bug in place: acquire LOCK_mysql_create_table and +# wait in wait_if_global_read_lock(). +connection con2; +send DROP DATABASE mysqltest_1; +--sleep 1 +# +# With bug in place: try to acquire LOCK_mysql_create_table... +# When fixed: Reject dropping db because of the read lock. +connection con1; +--error ER_CANT_UPDATE_WITH_READLOCK +DROP DATABASE mysqltest_1; +UNLOCK TABLES; +# +connection con2; +reap; +# +connection default; +disconnect con1; +disconnect con2; +# This must have been dropped by connection 2 already, +# which waited until the global read lock was released. +--error ER_DB_DROP_EXISTS +DROP DATABASE mysqltest_1; + # Bug#16986 - Deadlock condition with MyISAM tables # connection locker; |