diff options
author | antony@ltantony.rdg.cyberkinetica.homeunix.net <> | 2004-10-03 00:20:47 +0100 |
---|---|---|
committer | antony@ltantony.rdg.cyberkinetica.homeunix.net <> | 2004-10-03 00:20:47 +0100 |
commit | 2973a047eab453bae86705c33e901a947a0e6db7 (patch) | |
tree | 2b6e8c65a6d12454985b9e836b6d1a7c203750bd /mysql-test/t/lock_multi.test | |
parent | 5cf8e9d76913bc26c867287fcd45be8a15d6434d (diff) | |
download | mariadb-git-2973a047eab453bae86705c33e901a947a0e6db7.tar.gz |
Bug#4118: multi-table UPDATE takes WRITE lock on read table
Ensures that WRITE lock is not obtained on all tables referenced.
Diffstat (limited to 'mysql-test/t/lock_multi.test')
-rw-r--r-- | mysql-test/t/lock_multi.test | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test index 0295fca29e7..e20f8163751 100644 --- a/mysql-test/t/lock_multi.test +++ b/mysql-test/t/lock_multi.test @@ -51,6 +51,30 @@ reap; drop table t1; # +# Test problem when using locks with multi-updates +# It should not block when multi-update is reading on a read-locked table +# + +connection locker; +create table t1 (a int, b int); +create table t2 (c int, d int); +insert into t1 values(1,1); +insert into t1 values(2,2); +insert into t2 values(1,2); +lock table t1 read; +connection writer; +--sleep 2 +send update t1,t2 set c=a where b=d; +connection reader; +--sleep 2 +select c from t2; +connection writer; +reap; +connection locker; +drop table t1; +drop table t2; + +# # Test problem when using locks on many tables and droping a table that # is to-be-locked by another thread # |