diff options
author | acurtis@xiphis.org <> | 2005-05-24 11:44:34 +0100 |
---|---|---|
committer | acurtis@xiphis.org <> | 2005-05-24 11:44:34 +0100 |
commit | a6a589ef76b5042b5567ac45f58c6fa798986247 (patch) | |
tree | 6ac4b96fa2cc48da8e8b1d95d98e839fbceb877d /mysql-test/t/lock.test | |
parent | 76a20eb3976909d7e07ed6db19f05caef71e8d5b (diff) | |
download | mariadb-git-a6a589ef76b5042b5567ac45f58c6fa798986247.tar.gz |
Bug#7241 - Invalid response when DELETE .. USING and LOCK TABLES used.
Only acquire necessary write lock for multi-delete
Diffstat (limited to 'mysql-test/t/lock.test')
-rw-r--r-- | mysql-test/t/lock.test | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/lock.test b/mysql-test/t/lock.test index 26fc4e32bda..261c01b405c 100644 --- a/mysql-test/t/lock.test +++ b/mysql-test/t/lock.test @@ -59,3 +59,17 @@ unlock tables; lock tables t1 write, t1 as t1_alias read; insert into t1 select index1,nr from t1 as t1_alias; drop table t1,t2; + +# +# Bug7241 - Invalid response when DELETE .. USING and LOCK TABLES used. +# +create table t1 ( a int(11) not null auto_increment, primary key(a)); +create table t2 ( a int(11) not null auto_increment, primary key(a)); +lock tables t1 write, t2 read; +delete from t1 using t1,t2 where t1.a=t2.a; +delete t1 from t1,t2 where t1.a=t2.a; +--error 1099 +delete from t2 using t1,t2 where t1.a=t2.a; +--error 1099 +delete t2 from t1,t2 where t1.a=t2.a; +drop table t1,t2; |