| 1 |
# -------- |
| 2 |
# Startup |
| 3 |
# -------- |
| 4 |
CREATE TABLE t1 (C1 CHAR(10), C2 CHAR(10)); |
| 5 |
INSERT INTO t1 VALUES ("r1c1", "r1c2"); |
| 6 |
ALTER TABLE t1 ADD COLUMN C3 CHAR(10) FIRST, ALGORITHM=INSTANT; |
| 7 |
SET GLOBAL innodb_fast_shutdown = 0; |
| 8 |
# Take backup of original datadir |
| 9 |
# restart mysqld on backup datadir |
| 10 |
# restart: --datadir=BACKUP/data --log-error=BACKUP/my_restart.err |
| 11 |
SET GLOBAL innodb_dict_stats_disabled_debug = 1; |
| 12 |
SET GLOBAL innodb_master_thread_disabled_debug = 1; |
| 13 |
SET GLOBAL debug = "+d,disable_se_persists_gtid"; |
| 14 |
FLUSH ENGINE LOGS; |
| 15 |
SET GLOBAL debug = "+d,gtid_persist_flush_disable"; |
| 16 |
SET GLOBAL innodb_log_checkpoint_now = 1; |
| 17 |
SET GLOBAL innodb_page_cleaner_disabled_debug = 1; |
| 18 |
SET GLOBAL innodb_checkpoint_disabled = 1; |
| 19 |
SET GLOBAL innodb_purge_stop_now = 1; |
| 20 |
SET SESSION debug="+d,invalid_index_log_version"; |
| 21 |
UPDATE t1 SET C2 = "r1c22"; |
| 22 |
# Kill the server |
| 23 |
# start mysqld. It should crash with error |
| 24 |
# Expect found |
| 25 |
Pattern "Index log version [0-9]+ did not match. Max index version is [0-9]+. Recovery can't continue. Please make sure server is not starting up with the datadir generated in future version." found |
| 26 |
# restart mysqld normally |
| 27 |
SELECT * FROM t1; |
| 28 |
C3 C1 C2 |
| 29 |
NULL r1c1 r1c2 |
| 30 |
# -------- |
| 31 |
# Cleanup |
| 32 |
# -------- |
| 33 |
DROP TABLE t1; |