summaryrefslogtreecommitdiff
path: root/mysql-test/r/lock_multi.result
diff options
context:
space:
mode:
authorunknown <antony@ltantony.rdg.cyberkinetica.homeunix.net>2004-10-03 00:20:47 +0100
committerunknown <antony@ltantony.rdg.cyberkinetica.homeunix.net>2004-10-03 00:20:47 +0100
commita49f5cae9ad6f4de7f5c2d9f8bbdbca270376af6 (patch)
tree2b6e8c65a6d12454985b9e836b6d1a7c203750bd /mysql-test/r/lock_multi.result
parent799505216ff2fb29a48d7a609f8b392c8c6bb87c (diff)
downloadmariadb-git-a49f5cae9ad6f4de7f5c2d9f8bbdbca270376af6.tar.gz
Bug#4118: multi-table UPDATE takes WRITE lock on read table
Ensures that WRITE lock is not obtained on all tables referenced. mysql-test/r/lock_multi.result: Bug#4118 New test for multi-update locking mysql-test/r/multi_update.result: Bug#4118 Fix test mysql-test/t/lock_multi.test: Bug#4118 New test for multi-update locking mysql-test/t/multi_update.test: Bug#4118 Fix test sql/sql_parse.cc: Bug#4118 Split multi-update to its own case statement in sql_parse.cc sql/sql_update.cc: Bug#4118 Overview of locking checking: 1. Open and acquire READ lock 2. Check to see which tables need WRITE lock 3. Unlock tables and relock sql/sql_yacc.yy: Bug#4118 Split multi-update to its own case statement in sql_parse.cc
Diffstat (limited to 'mysql-test/r/lock_multi.result')
-rw-r--r--mysql-test/r/lock_multi.result12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result
index b808fca0acf..b5672fe1791 100644
--- a/mysql-test/r/lock_multi.result
+++ b/mysql-test/r/lock_multi.result
@@ -17,6 +17,18 @@ unlock tables;
n
1
drop table t1;
+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;
+ update t1,t2 set c=a where b=d;
+select c from t2;
+c
+2
+drop table t1;
+drop table t2;
create table t1 (a int);
create table t2 (a int);
lock table t1 write, t2 write;