summaryrefslogtreecommitdiff
path: root/mysql-test/t/lock_multi.test
diff options
context:
space:
mode:
authorunknown <elliot@mysql.com>2006-06-20 13:43:13 -0400
committerunknown <elliot@mysql.com>2006-06-20 13:43:13 -0400
commitb250722087ea2e99916c2b5bdfadbd51965f37cc (patch)
tree6640c55b79e5bebb77e1a194bbade17b6cc55213 /mysql-test/t/lock_multi.test
parent70a087e53daddaab806b39ad410ee9d026730e8f (diff)
downloadmariadb-git-b250722087ea2e99916c2b5bdfadbd51965f37cc.tar.gz
Applying patch from SergeyV
Fixes bug#17264, for alter table on win32 for successfull operation completion it is used TL_WRITE(=10) lock instead of TL_WRITE_ALLOW_READ(=6), however here in innodb handler TL_WRTIE is lifted to TL_WRITE_ALLOW_WRITE, which causes race condition when several clients do alter table simultaneously. mysql-test/r/lock_multi.result: Test case for bug#17264. mysql-test/t/lock_multi.test: Test case for bug#17264
Diffstat (limited to 'mysql-test/t/lock_multi.test')
-rw-r--r--mysql-test/t/lock_multi.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test
index ee03088b8c3..905d0699e6a 100644
--- a/mysql-test/t/lock_multi.test
+++ b/mysql-test/t/lock_multi.test
@@ -171,4 +171,30 @@ use test;
#
connection default;
+#
+# Bug #17264: MySQL Server freeze
+#
+connection locker;
+create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb;
+lock tables t1 write;
+connection writer;
+--sleep 2
+delimiter //;
+send alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
+delimiter ;//
+connection reader;
+--sleep 2
+delimiter //;
+send alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
+delimiter ;//
+connection locker;
+--sleep 2
+unlock tables;
+connection writer;
+reap;
+connection reader;
+reap;
+connection locker;
+drop table t1;
+
# End of 5.0 tests