| 1 |
--source include/have_debug.inc |
| 2 |
|
| 3 |
--echo # Prepare table: |
| 4 |
CREATE TABLE t1 (c1 INT); |
| 5 |
ALTER TABLE t1 ADD COLUMN c2 INT, ALGORITHM=INSTANT; |
| 6 |
INSERT INTO t1 VALUES (1,1); |
| 7 |
|
| 8 |
--echo # Case 1: |
| 9 |
--echo # ------- |
| 10 |
--echo # Simulate insert log record without common prefix compression when |
| 11 |
--echo # versions are different |
| 12 |
|
| 13 |
--echo # Disable page cleaners and prevent page flushing/checkpointing. |
| 14 |
--source ../include/log_disable_page_cleaners.inc |
| 15 |
|
| 16 |
SET GLOBAL DEBUG="+d,page_ins_simulate_differing_versions"; |
| 17 |
|
| 18 |
--echo # Generate redo logs |
| 19 |
INSERT INTO t1 VALUES (1,1); |
| 20 |
|
| 21 |
--echo # Simulate crash and recovery to apply redo logs |
| 22 |
--source include/kill_and_restart_mysqld.inc |
| 23 |
|
| 24 |
SET GLOBAL DEBUG="-d,page_ins_simulate_differing_versions"; |
| 25 |
|
| 26 |
SELECT * FROM t1; |
| 27 |
CHECK TABLE t1 EXTENDED; |
| 28 |
|
| 29 |
--echo # Case 2: |
| 30 |
--echo # ------- |
| 31 |
--echo # Simulate insert log record with common prefix compression when |
| 32 |
--echo # versions are same |
| 33 |
|
| 34 |
--echo # Disable page cleaners and prevent page flushing/checkpointing. |
| 35 |
--source ../include/log_disable_page_cleaners.inc |
| 36 |
|
| 37 |
--echo # Generate redo logs |
| 38 |
INSERT INTO t1 VALUES (1,1); |
| 39 |
|
| 40 |
--echo # Simulate crash and recovery to apply redo logs |
| 41 |
--source include/kill_and_restart_mysqld.inc |
| 42 |
|
| 43 |
SELECT * FROM t1; |
| 44 |
CHECK TABLE t1 EXTENDED; |
| 45 |
|
| 46 |
--echo # Resume page cleaners after recovery |
| 47 |
--source ../include/log_enable_page_cleaners.inc |
| 48 |
|
| 49 |
--echo # Cleanup: |
| 50 |
DROP TABLE t1; |
| 51 |
|