summaryrefslogtreecommitdiff
path: root/mysql-test/r/lock.result
diff options
context:
space:
mode:
authorunknown <acurtis@xiphis.org>2005-05-24 11:44:34 +0100
committerunknown <acurtis@xiphis.org>2005-05-24 11:44:34 +0100
commitefc7b884ebaa81416743b98fdbf909189443e70a (patch)
tree6ac4b96fa2cc48da8e8b1d95d98e839fbceb877d /mysql-test/r/lock.result
parentb6c1f2302ab77e6cfd37bd05f8444ff0c82bc459 (diff)
downloadmariadb-git-efc7b884ebaa81416743b98fdbf909189443e70a.tar.gz
Bug#7241 - Invalid response when DELETE .. USING and LOCK TABLES used.
Only acquire necessary write lock for multi-delete mysql-test/r/lock.result: Test for Bug#7241 mysql-test/t/lock.test: Test for Bug#7241 sql/sql_parse.cc: Bug#7241 Don't acquire write lock on all tables. Make sure to set lock_type on real table_list
Diffstat (limited to 'mysql-test/r/lock.result')
-rw-r--r--mysql-test/r/lock.result10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result
index 429bc5ed352..54162a36d83 100644
--- a/mysql-test/r/lock.result
+++ b/mysql-test/r/lock.result
@@ -47,3 +47,13 @@ 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;
+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;
+delete from t2 using t1,t2 where t1.a=t2.a;
+ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
+delete t2 from t1,t2 where t1.a=t2.a;
+ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
+drop table t1,t2;