diff options
author | holyfoot@mysql.com <> | 2006-03-09 10:21:58 +0400 |
---|---|---|
committer | holyfoot@mysql.com <> | 2006-03-09 10:21:58 +0400 |
commit | 481dc5b7e5ee385472a0b9bb7d8e187acd42c84e (patch) | |
tree | 45a7d98671f6e3ca2d2469df0b53193798b1dbbf /mysql-test | |
parent | b5fc0db76d06c0f22e06d17f49d73fcdd081261a (diff) | |
parent | 696c76778af086a05d1d01ac71c6a7af77334fee (diff) | |
download | mariadb-git-481dc5b7e5ee385472a0b9bb7d8e187acd42c84e.tar.gz |
Merge bk@192.168.21.1:mysql-5.1-new
into mysql.com:/home/hf/work/mysql-5.1.mrg
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ndb_lock.result | 11 | ||||
-rw-r--r-- | mysql-test/t/ndb_lock.test | 36 |
2 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/r/ndb_lock.result b/mysql-test/r/ndb_lock.result index b8c2c58aac4..ac93f15dac3 100644 --- a/mysql-test/r/ndb_lock.result +++ b/mysql-test/r/ndb_lock.result @@ -63,3 +63,14 @@ pk u o 5 5 5 insert into t1 values (1,1,1); drop table t1; +create table t3 (id2 int) engine=ndb; +lock tables t3 write; +unlock tables; +drop table t3; +create table t2 (id int, j int) engine=ndb; +insert into t2 values (2, 2); +create table t3 (id int) engine=ndb; +lock tables t3 read; +delete t2 from t2, t3 where t2.id = t3.id; +unlock tables; +drop table t2, t3; diff --git a/mysql-test/t/ndb_lock.test b/mysql-test/t/ndb_lock.test index 6945f91ee39..3d8597dcc45 100644 --- a/mysql-test/t/ndb_lock.test +++ b/mysql-test/t/ndb_lock.test @@ -70,3 +70,39 @@ insert into t1 values (1,1,1); drop table t1; # End of 4.1 tests + +# +# Bug #17812 Previous lock table for write causes "stray" lock +# although table is recreated +# +# this creating, locking, and dropping causes a subsequent hang +# on the delete below waiting for table t2 the locking in the +# "other" connection is relevant, as without it there is no problem +# +connection con1; +create table t3 (id2 int) engine=ndb; + +connection con2; +lock tables t3 write; +unlock tables; + +connection con1; +drop table t3; + +connection con1; +create table t2 (id int, j int) engine=ndb; +insert into t2 values (2, 2); +create table t3 (id int) engine=ndb; + +connection con2; +lock tables t3 read; + +connection con1; +# here we get a hang before bugfix although we shouldn't +delete t2 from t2, t3 where t2.id = t3.id; + +connection con2; +unlock tables; + +connection con1; +drop table t2, t3; |