Debian Codegraph @

mysql-test/suite/innodb/r/insert_redo_size_instant.result

raw
1 # Prepare table:
2 CREATE TABLE t1 (c1 INT);
3 ALTER TABLE t1 ADD COLUMN c2 INT, ALGORITHM=INSTANT;
4 INSERT INTO t1 VALUES (1,1);
5 # Case 1:
6 # -------
7 # Simulate insert log record without common prefix compression when
8 # versions are different
9 # Disable page cleaners and prevent page flushing/checkpointing.
10 SET GLOBAL innodb_dict_stats_disabled_debug = 1;
11 SET GLOBAL innodb_master_thread_disabled_debug = 1;
12 SET GLOBAL debug = "+d,disable_se_persists_gtid";
13 FLUSH ENGINE LOGS;
14 SET GLOBAL debug = "+d,gtid_persist_flush_disable";
15 SET GLOBAL innodb_log_checkpoint_now = 1;
16 SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
17 SET GLOBAL innodb_checkpoint_disabled = 1;
18 SET GLOBAL innodb_purge_stop_now = 1;
19 SET GLOBAL DEBUG="+d,page_ins_simulate_differing_versions";
20 # Generate redo logs
21 INSERT INTO t1 VALUES (1,1);
22 # Simulate crash and recovery to apply redo logs
23 # Kill and restart
24 SET GLOBAL DEBUG="-d,page_ins_simulate_differing_versions";
25 SELECT * FROM t1;
26 c1 c2
27 1 1
28 1 1
29 CHECK TABLE t1 EXTENDED;
30 Table Op Msg_type Msg_text
31 test.t1 check status OK
32 # Case 2:
33 # -------
34 # Simulate insert log record with common prefix compression when
35 # versions are same
36 # Disable page cleaners and prevent page flushing/checkpointing.
37 SET GLOBAL innodb_dict_stats_disabled_debug = 1;
38 SET GLOBAL innodb_master_thread_disabled_debug = 1;
39 SET GLOBAL debug = "+d,disable_se_persists_gtid";
40 FLUSH ENGINE LOGS;
41 SET GLOBAL debug = "+d,gtid_persist_flush_disable";
42 SET GLOBAL innodb_log_checkpoint_now = 1;
43 SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
44 SET GLOBAL innodb_checkpoint_disabled = 1;
45 SET GLOBAL innodb_purge_stop_now = 1;
46 # Generate redo logs
47 INSERT INTO t1 VALUES (1,1);
48 # Simulate crash and recovery to apply redo logs
49 # Kill and restart
50 SELECT * FROM t1;
51 c1 c2
52 1 1
53 1 1
54 1 1
55 CHECK TABLE t1 EXTENDED;
56 Table Op Msg_type Msg_text
57 test.t1 check status OK
58 # Resume page cleaners after recovery
59 SET GLOBAL debug = "-d,gtid_persist_flush_disable";
60 SET GLOBAL debug = "-d,disable_se_persists_gtid";
61 SET GLOBAL innodb_dict_stats_disabled_debug = 0;
62 SET GLOBAL innodb_master_thread_disabled_debug = 0;
63 SET GLOBAL innodb_page_cleaner_disabled_debug = 0;
64 SET GLOBAL innodb_checkpoint_disabled = 0;
65 SET GLOBAL innodb_purge_stop_now = 0;
66 SET GLOBAL innodb_purge_run_now = 1;
67 # Cleanup:
68 DROP TABLE t1;