Debian Codegraph @

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

raw
1 CREATE TABLE t(a INT PRIMARY KEY, b INT);
2 INSERT INTO t(a, b) VALUES(1, 1);
3 SET GLOBAL innodb_log_checkpoint_now = 1;
4 SET GLOBAL DEBUG = 'd,log_force_consumption';
5 # Wait until redo occupies no more than 1MB on disk
6 # Resize redo log to 100M:
7 SET GLOBAL innodb_redo_log_capacity = 100*1024*1024;
8 # Create connection which generates spam to the redo log.
9 CALL log_spammer();
10 # Wait until redo occupies at least 10MB on disk
11 # Kill and restart mysql allowing initially big redo log:
12 # Kill and restart: --innodb-redo-log-capacity=104857600
13 # Initial state:
14 SELECT variable_name, variable_value FROM performance_schema.global_status
15 WHERE variable_name = 'Innodb_redo_log_capacity_resized';
16 variable_name variable_value
17 Innodb_redo_log_capacity_resized 104857600
18 SET GLOBAL DEBUG = '+d,log_force_consumption';
19 # Waiting until we have exactly 1 redo log file.
20 There are <= 1 non-temporary redo log files.
21 SET GLOBAL DEBUG = '-d,log_force_consumption';
22 # Resize redo log to 8M:
23 SET GLOBAL innodb_redo_log_capacity = 8*1024*1024;
24 # Waiting for status = OK....
25 # Current state:
26 SELECT variable_name, variable_value FROM performance_schema.global_status
27 WHERE variable_name = 'Innodb_redo_log_capacity_resized';
28 variable_name variable_value
29 Innodb_redo_log_capacity_resized 8388608
30 Checking if total size of redo log files does not exceed 8388608 bytes
31 Pattern "Truncating redo log file" found
32 UPDATE t SET b = 2 WHERE a = 1;
33 CALL mtr.add_suppression("The last block of redo had corrupted first_rec_group");
34 # Kill and restart:
35 SELECT * FROM t;
36 a b
37 1 2
38 DROP TABLE t;