1Bug #18412598 UNCLEAN SYSTEM SHUTDOWN RECOVERY FAILS 2FOR SCHEMA WITH CAPITAL LETTERS 3create database MYDB; 4USE MYDB; 5CREATE TABLE mytable (id int primary key) ENGINE=innodb; 6CREATE TABLE FOO (id int,constraint FOREIGN KEY (id) REFERENCES mytable(id) ON DELETE CASCADE) ENGINE=innodb; 7CREATE TABLE mytable_ref (id int,constraint FOREIGN KEY (id) REFERENCES FOO(id) ON DELETE CASCADE) ENGINE=innodb; 8INSERT INTO mytable VALUES (10),(20),(30),(40); 9INSERT INTO FOO VALUES (20),(10); 10INSERT INTO mytable_ref VALUES (20),(10); 11SHOW VARIABLES LIKE 'innodb_fast_shutdown'; 12Variable_name Value 13innodb_fast_shutdown 2 14START TRANSACTION; 15INSERT INTO mytable VALUES (50); 16INSERT INTO FOO VALUES (50); 17INSERT INTO mytable_ref VALUES (50); 18# Restart the server. This will go into crash recovery mode 19USE MYDB; 20SELECT * FROM mytable; 21id 2210 2320 2430 2540 26SELECT * FROM FOO; 27id 2810 2920 30SELECT * FROM mytable_ref; 31id 3210 3320 34DELETE FROM mytable WHERE id =10; 35SELECT * FROM FOO; 36id 3720 38SELECT * FROM mytable_ref; 39id 4020 41CREATE TABLE MYtable (id int) ENGINE=innodb; 42ERROR 42S01: Table 'mytable' already exists 43CREATE TABLE Foo (id int) ENGINE=innodb; 44ERROR 42S01: Table 'foo' already exists 45DROP TABLE mytable_ref,FOO; 46DROP TABLE mytable; 47use test; 48DROP DATABASE MYDB; 49