diff options
author | unknown <davi@endora.local> | 2007-11-28 10:49:30 -0200 |
---|---|---|
committer | unknown <davi@endora.local> | 2007-11-28 10:49:30 -0200 |
commit | aea86c6611338be8ceb2d3e536802b77f2c6f966 (patch) | |
tree | 95500906bafca78d312d23673efb873171c83027 /mysql-test | |
parent | 77ab800e7710d8f8e5706ccc1f39689ba8a9d059 (diff) | |
parent | 4b00263596143da75adb51f3d6ac64f1e078d3af (diff) | |
download | mariadb-git-aea86c6611338be8ceb2d3e536802b77f2c6f966.tar.gz |
Merge mysql.com:/Users/davi/mysql/bugs/31479-5.0
into mysql.com:/Users/davi/mysql/mysql-5.0-runtime
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/lock_multi.result | 11 | ||||
-rw-r--r-- | mysql-test/t/lock_multi.test | 32 |
2 files changed, 43 insertions, 0 deletions
diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result index af49e1a27dc..079f92ca420 100644 --- a/mysql-test/r/lock_multi.result +++ b/mysql-test/r/lock_multi.result @@ -88,3 +88,14 @@ alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; // unlock tables; drop table t1; +drop table if exists t1; +create table t1 (a int); +connection: locker +lock tables t1 read; +connection: writer +create table t2 like t1;; +connection: default +kill query +ERROR 70100: Query execution was interrupted +unlock tables; +drop table t1; diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test index d670bb55a18..649c1a4efbd 100644 --- a/mysql-test/t/lock_multi.test +++ b/mysql-test/t/lock_multi.test @@ -249,4 +249,36 @@ reap; connection locker; drop table t1; +# +# Bug#31479 Bad lock interaction if CREATE TABLE LIKE is killed +# + +--disable_warnings +drop table if exists t1; +--enable_warnings +create table t1 (a int); +--echo connection: locker +connection locker; +lock tables t1 read; +--echo connection: writer +connection writer; +let $ID= `select connection_id()`; +--send create table t2 like t1; +--echo connection: default +connection default; +let $show_type= open tables where in_use=2 and name_locked=1; +let $show_pattern= '%t1%2%1'; +--source include/wait_show_pattern.inc +--echo kill query +disable_query_log; +eval kill query $ID; +enable_query_log; +connection writer; +--error ER_QUERY_INTERRUPTED +--reap +connection locker; +unlock tables; +connection default; +drop table t1; + # End of 5.0 tests |