Commit a7c244e7 authored by Konstantin Osipov's avatar Konstantin Osipov

Backport of:

------------------------------------------------------------
revno: 2617.31.7
committer: Davi Arnaut <Davi.Arnaut@Sun.COM>
branch nick: mysql-6.0-runtime
timestamp: Wed 2009-03-25 19:22:00 -0300
message:
WL#4284: Transactional DDL locking

Post-merge fixes for test cases.
parent 0b39c189
...@@ -899,6 +899,8 @@ CREATE PROCEDURE p1 () ...@@ -899,6 +899,8 @@ CREATE PROCEDURE p1 ()
BEGIN BEGIN
DECLARE i INT DEFAULT 50; DECLARE i INT DEFAULT 50;
DECLARE cnt INT; DECLARE cnt INT;
# Continue even in the presence of ER_LOCK_DEADLOCK.
DECLARE CONTINUE HANDLER FOR 1213 BEGIN END;
START TRANSACTION; START TRANSACTION;
ALTER TABLE t1 ENGINE=InnoDB; ALTER TABLE t1 ENGINE=InnoDB;
COMMIT; COMMIT;
......
...@@ -1105,6 +1105,8 @@ CREATE PROCEDURE p1 () ...@@ -1105,6 +1105,8 @@ CREATE PROCEDURE p1 ()
BEGIN BEGIN
DECLARE i INT DEFAULT 50; DECLARE i INT DEFAULT 50;
DECLARE cnt INT; DECLARE cnt INT;
# Continue even in the presence of ER_LOCK_DEADLOCK.
DECLARE CONTINUE HANDLER FOR 1213 BEGIN END;
START TRANSACTION; START TRANSACTION;
ALTER TABLE t1 ENGINE=InnoDB; ALTER TABLE t1 ENGINE=InnoDB;
COMMIT; COMMIT;
......
...@@ -214,9 +214,4 @@ INSERT INTO t1 VALUES (NULL, 'first row t2'); ...@@ -214,9 +214,4 @@ INSERT INTO t1 VALUES (NULL, 'first row t2');
SET autocommit=OFF; SET autocommit=OFF;
ALTER TABLE t1 AUTO_INCREMENT = 10; ALTER TABLE t1 AUTO_INCREMENT = 10;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction ERROR HY000: Lock wait timeout exceeded; try restarting transaction
INSERT INTO t1 VALUES (NULL, 'second row t2');
SELECT a,b FROM t1 ORDER BY a;
a b
1 first row t2
2 second row t2
DROP TABLE t1; DROP TABLE t1;
...@@ -71,9 +71,6 @@ SET autocommit=OFF; ...@@ -71,9 +71,6 @@ SET autocommit=OFF;
--error ER_LOCK_WAIT_TIMEOUT --error ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 AUTO_INCREMENT = 10; ALTER TABLE t1 AUTO_INCREMENT = 10;
--connection con1
INSERT INTO t1 VALUES (NULL, 'second row t2');
SELECT a,b FROM t1 ORDER BY a;
--disconnect con2 --disconnect con2
--disconnect con1 --disconnect con1
--connection default --connection default
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment