summaryrefslogtreecommitdiff
path: root/mysql-test/t/innodb_mysql.test
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-02-19 20:30:05 +0200
committerGeorgi Kodinov <joro@sun.com>2009-02-19 20:30:05 +0200
commit901427b2413a8f8c80b4720969d101357da57556 (patch)
tree5e934ca40c0afa37342cc84b5469c0a95bd97c34 /mysql-test/t/innodb_mysql.test
parente89fddc63684301a0e958fe54a5917fdbad56877 (diff)
parentcf42f6689fd52da07fd6588d2aaded1f0f39abae (diff)
downloadmariadb-git-901427b2413a8f8c80b4720969d101357da57556.tar.gz
merged 5.0-bugteam -> 5.1-bugteam
Diffstat (limited to 'mysql-test/t/innodb_mysql.test')
-rw-r--r--mysql-test/t/innodb_mysql.test52
1 files changed, 52 insertions, 0 deletions
diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test
index 21ee440f10b..77140fd85d7 100644
--- a/mysql-test/t/innodb_mysql.test
+++ b/mysql-test/t/innodb_mysql.test
@@ -55,6 +55,57 @@ 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;
+
+#
# Bug #37742: HA_EXTRA_KEYREAD flag is set when key contains only prefix of
# requested column
#
@@ -91,6 +142,7 @@ INSERT INTO foo2 SELECT * FROM foo;
DROP TABLE foo, bar, foo2;
+
#
# Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites locking type of temp table
#