Debian Codegraph @

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

raw
1 # Scenario 1
2 # Ensure we do not allow recovery in read-only mode.
3 #
4 # Prepare non empty redo log and crash.
5 SET GLOBAL innodb_redo_log_capacity = 10*1024*1024;
6 SET GLOBAL innodb_monitor_enable = module_log;
7 SET GLOBAL innodb_page_cleaner_disabled_debug = 0;
8 SET GLOBAL innodb_checkpoint_disabled = 1;
9 CREATE TABLE t (a INT PRIMARY KEY) ENGINE = INNODB;
10 INSERT INTO t (a) VALUES (1);
11 Expecting 1 as result of below query:
12 SELECT COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS
13 WHERE NAME = 'log_lsn_checkpoint_age';
14 COUNT > 0
15 1
16 # Kill the server
17 # Restart MySQL in read-only mode (the same redo capacity).
18 Pattern "Can.t initiate database recovery, running in read-only-mode" found
19 # Cleanup...
20 # restart
21 DROP TABLE t;
22 # Scenario 2
23 # Ensure we do not allow to resize redo log in read-only mode.
24 #
25 # Perform slow shutdown to ensure redo is empty.
26 SET GLOBAL innodb_fast_shutdown = 0;
27 # Restart MySQL in read-only mode (different redo log capacity).
28 # restart: --innodb-read-only --innodb-redo-log-capacity=8M --log-error=MYSQLD_LOG_2
29 Pattern "Ignored the innodb-redo-log-capacity option in the Innodb read-only mode" found
30 SELECT @@innodb_redo_log_capacity;
31 @@innodb_redo_log_capacity
32 8388608
33 SET GLOBAL innodb_fast_shutdown = 0;
34 # Scenario 3
35 # Ensure to print warning in case --innodb_log_file_size is specified.
36 #
37 # restart: --innodb-read-only --innodb_log_file_size=4194304 --log-error=MYSQLD_LOG_3
38 Pattern "Ignored the innodb-redo-log-capacity option in the Innodb read-only mode" found
39 SET GLOBAL innodb_fast_shutdown = 0;
40 # Scenario 4
41 # Ensure to print warning in case --innodb_log_files_in_group is specified.
42 #
43 # restart: --innodb-read-only --innodb_log_files_in_group=4 --log-error=MYSQLD_LOG_4
44 Pattern "Ignored the innodb-redo-log-capacity option in the Innodb read-only mode" found
45 SET GLOBAL innodb_fast_shutdown = 0;
46 # Scenario 5
47 # Refuse to start in read-only mode without log files.
48 #
49 # Remove all redo log files.
50 Pattern "Cannot create redo log files in read-only mode" found
51 # Cleanup...
52 # restart
53 # Scenario 6
54 # Restart MySQL in read-only mode
55 # Ensure we do not allow to change the innodb_redo_log_capacity in read-only mode.
56 # Try to set some random value to innodb_redo_log_capacity
57 set global innodb_redo_log_capacity=60000000;
58 ERROR HY000: Cannot change the 'innodb-redo-log-capacity' system variable in read-only mode.
59 # Try to set default value to innodb_redo_log_capacity
60 set global innodb_redo_log_capacity=10485760;
61 ERROR HY000: Cannot change the 'innodb-redo-log-capacity' system variable in read-only mode.
62 # Cleanup...