1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug #42419: test suite fix

Moved the test case for the bug into a separate file (and restored the 
original innodb_mysql test setup).
Used the new wait_show_condition test macro to avoid the usage of sleep
This commit is contained in:
Georgi Kodinov
2009-02-20 11:12:06 +02:00
parent 759edca6ac
commit 39dc3623b3
6 changed files with 173 additions and 68 deletions

View File

@ -1025,55 +1025,4 @@ CREATE INDEX i1 on t1 (a(3));
SELECT * FROM t1 WHERE a = 'abcde';
DROP TABLE t1;
#
# Bug #42419: Server crash with "Pure virtual method called" on two
# concurrent connections
#
connect (c1, localhost, root,,);
connect (c2, localhost, root,,);
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT)
ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
connection c1;
SET AUTOCOMMIT = 0;
CREATE TEMPORARY TABLE t1_tmp (b INT);
INSERT INTO t1_tmp SELECT b FROM t1 WHERE a = 3;
INSERT INTO t1_tmp SELECT b FROM t1 WHERE a = 2;
connection c2;
SET AUTOCOMMIT = 0;
CREATE TEMPORARY TABLE t2_tmp ( a INT, new_a INT);
INSERT INTO t2_tmp VALUES (1,51),(2,52),(3,53);
UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 1;
--send
UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 2;
--sleep 3
connection c1;
--error ER_LOCK_DEADLOCK
INSERT INTO t1_tmp SELECT b FROM t1 WHERE a = 1;
connection c2;
--reap
UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 3;
connection default;
disconnect c1;
disconnect c2;
DROP TABLE t1;
--echo End of 5.0 tests