summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r/innodb-index.result
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2011-06-22 11:20:19 +0300
committerMarko Mäkelä <marko.makela@oracle.com>2011-06-22 11:20:19 +0300
commite1aa1f874ec6ac67ee14cabd6ba3c5f28bc3a79f (patch)
tree944dcaa9d2e99977d5850df937ba98645f2358a1 /mysql-test/suite/innodb/r/innodb-index.result
parentc75e8aa6e1ff904c75ace8e9ddb213b412c7216c (diff)
downloadmariadb-git-e1aa1f874ec6ac67ee14cabd6ba3c5f28bc3a79f.tar.gz
Bug#11753728 45225: Locking: hang if drop table with no timeout
Re-enable a test that was disabled as collateral damage. Starting with MySQL 5.5, queries will acquire and hold a shared meta-data lock (MDL) on tables they process, until the transaction is committed or rolled back. This will prevent DDL operations on the tables, such as creating an index. innodb-index.test: Use a second table for creating the index. The index will still be "too new" for the transaction that was started before the index creation was started.
Diffstat (limited to 'mysql-test/suite/innodb/r/innodb-index.result')
-rw-r--r--mysql-test/suite/innodb/r/innodb-index.result40
1 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result
index 7d7062c9161..3f3a14c72f2 100644
--- a/mysql-test/suite/innodb/r/innodb-index.result
+++ b/mysql-test/suite/innodb/r/innodb-index.result
@@ -1085,3 +1085,43 @@ t2 CREATE TABLE `t2` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2;
DROP TABLE t1;
+CREATE TABLE t1 (a INT, b CHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (3,'a'),(3,'b'),(1,'c'),(0,'d'),(1,'e');
+CREATE TABLE t2 SELECT * FROM t1;
+BEGIN;
+SELECT * FROM t1;
+a b
+3 a
+3 b
+1 c
+0 d
+1 e
+SET lock_wait_timeout=1;
+CREATE INDEX t1a ON t1(a);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+CREATE INDEX t2a ON t2(a);
+SELECT * FROM t2;
+a b
+3 a
+3 b
+1 c
+0 d
+1 e
+SELECT * FROM t2 FORCE INDEX(t2a) ORDER BY a;
+ERROR HY000: Table definition has changed, please retry transaction
+SELECT * FROM t2;
+a b
+3 a
+3 b
+1 c
+0 d
+1 e
+COMMIT;
+SELECT * FROM t2 FORCE INDEX(t2a) ORDER BY a;
+a b
+0 d
+1 c
+1 e
+3 a
+3 b
+DROP TABLE t1,t2;