1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-11635 innodb.innodb_mysql test hangs

Copy and adapt the test from MySQL 5.7.17.
This commit is contained in:
Marko Mäkelä
2016-12-22 16:48:49 +02:00
parent d6a1f9f10f
commit 08f79bdeda
3 changed files with 121 additions and 25 deletions

View File

@ -13,10 +13,8 @@
-- source include/have_innodb.inc
let $engine_type= InnoDB;
let $other_engine_type= MEMORY;
# InnoDB does support FOREIGN KEYFOREIGN KEYs
# InnoDB does support FOREIGN KEYs
let $test_foreign_keys= 1;
set global innodb_support_xa=default;
set session innodb_support_xa=default;
--source include/mix1.inc
--disable_warnings
@ -359,12 +357,16 @@ INSERT INTO t2 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
INSERT INTO t3 VALUES (1, 101), (2, 102), (3, 103), (4, 104), (5, 105), (6, 106);
INSERT INTO t4 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
UPDATE t1, t2 SET t1.a = t1.a + 100, t2.b = t1.a + 10
# Because t1.a changes and t2.b changes based on t1.a, the result
# depends on join order, so STRAIGHT_JOIN is used to have it repeatable.
UPDATE t2 straight_join t1 SET t1.a = t1.a + 100, t2.b = t1.a + 10
WHERE t1.a BETWEEN 2 AND 4 AND t2.a = t1.b;
--sorted_result
SELECT * FROM t2;
UPDATE t3, t4 SET t3.a = t3.a + 100, t4.b = t3.a + 10
# Because t1.a changes and t2.b changes based on t1.a, the result
# depends on join order, so STRAIGHT_JOIN is used to have it repeatable.
UPDATE t4 straight_join t3 SET t3.a = t3.a + 100, t4.b = t3.a + 10
WHERE t3.a BETWEEN 2 AND 4 AND t4.a = t3.b - 100;
--sorted_result
SELECT * FROM t4;
@ -420,7 +422,7 @@ INSERT INTO t1 SELECT c1+1000,c2+1000,c3+1000 from t1;
INSERT INTO t1 SELECT c1+10000,c2+10000,c3+10000 from t1;
INSERT INTO t1 SELECT c1+100000,c2+100000,c3+100000 from t1;
INSERT INTO t1 SELECT c1+1000000,c2+1000000,c3+1000000 from t1;
ANALYZE TABLE t1;
# query and no rows will match the c1 condition, whereas all will match c3
SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;