Skip to content

Commit

Permalink
MDEV-16273 innodb.alter_kill fails Unknown storage engine 'InnoDB'
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dr-m committed Oct 10, 2018
1 parent 43ee691 commit 2610c26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mysql-test/suite/innodb/r/alter_kill.result
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/innodb/t/alter_kill.test
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2610c26

Please sign in to comment.