| 1 |
SET GLOBAL innodb_file_per_table=ON; |
| 2 |
# |
| 3 |
# Disable page cleaners and prevent page flushing/checkpointing. |
| 4 |
# |
| 5 |
SET GLOBAL innodb_dict_stats_disabled_debug = 1; |
| 6 |
SET GLOBAL innodb_master_thread_disabled_debug = 1; |
| 7 |
SET GLOBAL debug = "+d,disable_se_persists_gtid"; |
| 8 |
FLUSH ENGINE LOGS; |
| 9 |
SET GLOBAL debug = "+d,gtid_persist_flush_disable"; |
| 10 |
SET GLOBAL innodb_log_checkpoint_now = 1; |
| 11 |
SET GLOBAL innodb_page_cleaner_disabled_debug = 1; |
| 12 |
SET GLOBAL innodb_checkpoint_disabled = 1; |
| 13 |
SET GLOBAL innodb_purge_stop_now = 1; |
| 14 |
# |
| 15 |
# Prepare tablespace and fill in some data. |
| 16 |
# |
| 17 |
CREATE TABLE t1(a INT); |
| 18 |
INSERT INTO t1 VALUES (1),(2),(3),(4); |
| 19 |
INSERT INTO t1 VALUES (1),(2),(3),(4); |
| 20 |
INSERT INTO t1 VALUES (1),(2),(3),(4); |
| 21 |
INSERT INTO t1 VALUES (1),(2),(3),(4); |
| 22 |
INSERT INTO t1 VALUES (1),(2),(3),(4); |
| 23 |
INSERT INTO t1 VALUES (1),(2),(3),(4); |
| 24 |
INSERT INTO t1 VALUES (1),(2),(3),(4); |
| 25 |
INSERT INTO t1 VALUES (1),(2),(3),(4); |
| 26 |
INSERT INTO t1 VALUES (1),(2),(3),(4); |
| 27 |
INSERT INTO t1 SELECT * FROM t1; |
| 28 |
INSERT INTO t1 SELECT * FROM t1; |
| 29 |
INSERT INTO t1 SELECT * FROM t1; |
| 30 |
INSERT INTO t1 SELECT * FROM t1; |
| 31 |
# |
| 32 |
# Spam the redolog to force the previous data to be applied. |
| 33 |
# We set 5MB Buffer Pool, so around that many redologs is required. One |
| 34 |
# spam iteration will provide 400KB of log. |
| 35 |
# |
| 36 |
CALL log_spam(13); |
| 37 |
# |
| 38 |
# Drop tablespace now. After the crash, the previous log apply would |
| 39 |
# make the t1 tablespace be opened for recovery. Later, during the scan |
| 40 |
# of a next redo block, we would close it. |
| 41 |
# |
| 42 |
SET DEBUG='+d, space_delete_crash'; |
| 43 |
DROP TABLE t1; |
| 44 |
ERROR HY000: Lost connection to MySQL server during query |
| 45 |
# restart |
| 46 |
# |
| 47 |
# Cleanup |
| 48 |
# |