diff options
Diffstat (limited to 'mysql-test/t/drop.test')
-rw-r--r-- | mysql-test/t/drop.test | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test index bb4dd3e11f9..4aeb7165bcb 100644 --- a/mysql-test/t/drop.test +++ b/mysql-test/t/drop.test @@ -124,6 +124,39 @@ disconnect addconroot1; --source include/wait_until_disconnected.inc connection default; +# +# Bug#25858 Some DROP TABLE under LOCK TABLES can cause deadlocks +# + +--disable_warnings +drop table if exists t1,t2; +--enable_warnings +create table t1 (a int); +create table t2 (a int); +lock table t1 read; +--error ER_TABLE_NOT_LOCKED +drop table t2; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop table t1; +unlock tables; +drop table t1,t2; +connect (addconroot, localhost, root,,); +connection default; +create table t1 (i int); +create table t2 (i int); +lock tables t1 read; +connection addconroot; +lock tables t2 read; +--error ER_TABLE_NOT_LOCKED +drop table t1; +connection default; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop table t1,t2; +disconnect addconroot; +connection default; +unlock tables; +drop table t1,t2; + --echo End of 5.0 tests # @@ -202,3 +235,24 @@ use test; drop database mysqltestbug26703; --echo End of 5.1 tests + +########################################################################### + +--echo +--echo # -- +--echo # -- Bug#37431 (DROP TABLE does not report errors correctly). +--echo # -- + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +--error ER_BAD_TABLE_ERROR +DROP TABLE t1; + +SHOW WARNINGS; + +--echo +--echo # -- +--echo # -- End of Bug#37431. +--echo # -- |