Debian Codegraph @

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

raw
1 # Prepare schema used in the tests.
2 CREATE TABLE t (a INT) ENGINE=InnoDB;
3 # Ensure there is a lot of free space in the redo log.
4 SET GLOBAL innodb_log_checkpoint_now = ON;
5 SET GLOBAL DEBUG = '+d,log_force_consumption';
6 SET GLOBAL DEBUG = '+d,syncpoint_log_before_waiting_for_next_file';
7 # Freeze log files consumer.
8 CALL mtr.add_suppression("Redo log writer is waiting for a new redo log file. Consider increasing innodb_redo_log_capacity. The current log capacity is.*");;
9 SET GLOBAL DEBUG = '+d,syncpoint_log_before_file_consume';
10 # Wait until log files consumer is frozen.
11 SET DEBUG_SYNC = 'now WAIT_FOR reached_log_before_file_consume';
12 # Consumer is frozen. Create connection which generates spam to the redo log.
13 CALL log_spammer();
14 # Redo log data is being generated.
15 # Wait until log_writer signals it is waiting for a next file available.
16 SET DEBUG_SYNC = 'now WAIT_FOR reached_log_before_waiting_for_next_file';
17 SET GLOBAL DEBUG = '-d,syncpoint_log_before_waiting_for_next_file';
18 SET DEBUG_SYNC = 'now SIGNAL continue_log_before_waiting_for_next_file';
19 # The log_writer is waiting because there are no free files and consumer is frozen.
20 # Check that error log received information about that.
21 Pattern "Redo log writer is waiting for a new redo log file. Consider increasing innodb_redo_log_capacity. The current log capacity is" found
22 # Unfreeze the log file consumer and wait until next log file is produced.
23 SET GLOBAL DEBUG = '+d,syncpoint_log_after_file_produced';
24 SET GLOBAL DEBUG = '-d,syncpoint_log_before_file_consume';
25 SET DEBUG_SYNC = 'now SIGNAL continue_log_before_file_consume';
26 SET DEBUG_SYNC = 'now WAIT_FOR reached_log_after_file_produced';
27 SET GLOBAL DEBUG = '-d,syncpoint_log_after_file_produced';
28 SET DEBUG_SYNC = 'now SIGNAL continue_log_after_file_produced';
29 # Create 1 row in t.
30 INSERT INTO t(a) VALUES(42);
31 # Kill the MySQL and recover to see all is fine
32 # Kill and restart
33 SELECT * FROM t;
34 a
35 42
36 # Cleanup.
37 SET DEBUG_SYNC = 'RESET';
38 DROP TABLE t;