diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-07-23 17:07:29 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-07-23 17:07:29 +0300 |
commit | 2e4369cad338c86a903806db81d3d9fab4759b62 (patch) | |
tree | 3b2ac62ec9a546336b9c764670af682f2a2e6565 /mysql-test/t/innodb_mysql.test | |
parent | b3557f8d36749081be3131b3cfbc68a8034df397 (diff) | |
parent | 1fe34a9294effa8c250054a04521108535416f5b (diff) | |
download | mariadb-git-2e4369cad338c86a903806db81d3d9fab4759b62.tar.gz |
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B29644-5.0-opt
sql/ha_innodb.cc:
Auto merged
sql/sql_base.cc:
Auto merged
mysql-test/r/innodb_mysql.result:
5.0-opt merge
mysql-test/t/innodb_mysql.test:
5.0-opt merge
Diffstat (limited to 'mysql-test/t/innodb_mysql.test')
-rw-r--r-- | mysql-test/t/innodb_mysql.test | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index 3a9d31ba804..63431e10bbf 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -740,6 +740,8 @@ SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c) set @@sort_buffer_size=default; DROP TABLE t1,t2; + + # Bug#27296 Assertion in ALTER TABLE SET DEFAULT in Linux Debug build # (possible deadlock). # @@ -787,4 +789,56 @@ SELECT * FROM t2 WHERE b=1 AND c=1 ORDER BY c,a; DROP TABLE t1,t2; + +# +# Bug #29644: alter table hangs if records locked in share mode by long +# running transaction +# + +CREATE TABLE t1 (a INT, PRIMARY KEY (a)) ENGINE=InnoDB; + +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8); +INSERT INTO t1 SELECT a + 8 FROM t1; +INSERT INTO t1 SELECT a + 16 FROM t1; + +DELIMITER |; +CREATE PROCEDURE p1 () +BEGIN + DECLARE i INT DEFAULT 50; + DECLARE cnt INT; + START TRANSACTION; + ALTER TABLE t1 ENGINE=InnoDB; + COMMIT; + START TRANSACTION; + WHILE (i > 0) DO + SET i = i - 1; + SELECT COUNT(*) INTO cnt FROM t1 LOCK IN SHARE MODE; + END WHILE; + COMMIT; +END;| + +DELIMITER ;| + +CONNECT (con1,localhost,root,,); +CONNECT (con2,localhost,root,,); + +CONNECTION con1; +SEND CALL p1(); +CONNECTION con2; +SEND CALL p1(); +CONNECTION default; +CALL p1(); + +CONNECTION con1; +REAP; +CONNECTION con2; +REAP; +CONNECTION default; +DISCONNECT con1; +DISCONNECT con2; + +DROP PROCEDURE p1; +DROP TABLE t1; + + --echo End of 5.0 tests |