summaryrefslogtreecommitdiff
path: root/mysql-test/t/lock.test
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2006-01-23 19:19:29 +0100
committerunknown <ingo@mysql.com>2006-01-23 19:19:29 +0100
commitcfbb86034d284c8c24a63725735f17cf00304b3b (patch)
tree1d6a2586cc6dbd78e7aa54ba1b374e9d00f5e551 /mysql-test/t/lock.test
parent6d5674dcd39917bff04be3c73570f66bc2aa05a4 (diff)
parent15ecf9228a3ba5e65f39cf87f941d0d997683dc6 (diff)
downloadmariadb-git-cfbb86034d284c8c24a63725735f17cf00304b3b.tar.gz
Merge mysql.com:/home/mydev/mysql-4.0-bug5390
into mysql.com:/home/mydev/mysql-4.1-bug5390 sql/table.h: Auto merged mysql-test/r/lock.result: BUG#5390 - problems with merge tables Manual merge from 4.0. mysql-test/t/lock.test: BUG#5390 - problems with merge tables Manual merge from 4.0. sql/lock.cc: BUG#5390 - problems with merge tables Manual merge from 4.0.
Diffstat (limited to 'mysql-test/t/lock.test')
-rw-r--r--mysql-test/t/lock.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/lock.test b/mysql-test/t/lock.test
index 4809dcc5abe..adf13fb4dd8 100644
--- a/mysql-test/t/lock.test
+++ b/mysql-test/t/lock.test
@@ -61,6 +61,24 @@ insert into t1 select index1,nr from t1 as t1_alias;
drop table t1,t2;
#
+# BUG#5390 - problems with merge tables
+# Supplement test for the after-fix optimization
+# Check that a dropped table is correctly removed from a lock.
+create table t1 (c1 int);
+create table t2 (c1 int);
+create table t3 (c1 int);
+lock tables t1 write, t2 write, t3 write;
+# This removes one table after the other from the lock.
+drop table t2, t3, t1;
+#
+# Check that a lock merge works.
+create table t1 (c1 int);
+create table t2 (c1 int);
+create table t3 (c1 int);
+lock tables t1 write, t2 write, t3 write, t1 as t4 read;
+alter table t2 add column c2 int;
+drop table t1, t2, t3;
+
# Bug7241 - Invalid response when DELETE .. USING and LOCK TABLES used.
#
create table t1 ( a int(11) not null auto_increment, primary key(a));