From 2610c26a53b4f65f7a8f6ce8b6da96eb39b0cfbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 10 Oct 2018 06:14:14 +0300 Subject: [PATCH] MDEV-16273 innodb.alter_kill fails Unknown storage engine 'InnoDB' The test is shutting down InnoDB, corrupting a file, and finally restarting InnoDB. Before the shutdown, the test created the table and inserted some records. Before MDEV-12288, there would be no access to the table after server restart, but after MDEV-12288 purge would reset the transaction identifier after the INSERT, and this would sometimes happen after the restart. To make the test deterministic, wait for purge to complete before the shutdown. --- mysql-test/suite/innodb/r/alter_kill.result | 2 ++ mysql-test/suite/innodb/t/alter_kill.test | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mysql-test/suite/innodb/r/alter_kill.result b/mysql-test/suite/innodb/r/alter_kill.result index 9b24fddf9ef..87c89834ec1 100644 --- a/mysql-test/suite/innodb/r/alter_kill.result +++ b/mysql-test/suite/innodb/r/alter_kill.result @@ -2,10 +2,12 @@ # Bug#16720368 INNODB CRASHES ON BROKEN #SQL*.IBD FILE AT STARTUP # SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_purge_rseg_truncate_frequency=1; CREATE TABLE bug16720368_1 (a INT PRIMARY KEY) ENGINE=InnoDB; connect con1,localhost,root; CREATE TABLE bug16720368 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; INSERT INTO bug16720368 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8); +InnoDB 0 transactions not purged connection default; # Cleanly shutdown mysqld disconnect con1; diff --git a/mysql-test/suite/innodb/t/alter_kill.test b/mysql-test/suite/innodb/t/alter_kill.test index 922378d2919..628ff553fc0 100644 --- a/mysql-test/suite/innodb/t/alter_kill.test +++ b/mysql-test/suite/innodb/t/alter_kill.test @@ -27,12 +27,14 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile -- echo # SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_purge_rseg_truncate_frequency=1; CREATE TABLE bug16720368_1 (a INT PRIMARY KEY) ENGINE=InnoDB; connect (con1,localhost,root); CREATE TABLE bug16720368 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; INSERT INTO bug16720368 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8); +--source include/wait_all_purged.inc connection default;