File: log_read_only.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (62 lines) | stat: -rw-r--r-- 2,549 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Scenario 1
# Ensure we do not allow recovery in read-only mode.
#
# Prepare non empty redo log and crash.
SET GLOBAL innodb_redo_log_capacity = 10*1024*1024;
SET GLOBAL innodb_monitor_enable = module_log;
SET GLOBAL innodb_page_cleaner_disabled_debug = 0;
SET GLOBAL innodb_checkpoint_disabled = 1;
CREATE TABLE t (a INT PRIMARY KEY) ENGINE = INNODB;
INSERT INTO t (a) VALUES (1);
Expecting 1 as result of below query:
SELECT COUNT > 0 FROM INFORMATION_SCHEMA.INNODB_METRICS
WHERE NAME = 'log_lsn_checkpoint_age';
COUNT > 0
1
# Kill the server
# Restart MySQL in read-only mode (the same redo capacity).
Pattern "Can.t initiate database recovery, running in read-only-mode" found
# Cleanup...
# restart
DROP TABLE t;
# Scenario 2
# Ensure we do not allow to resize redo log in read-only mode.
#
# Perform slow shutdown to ensure redo is empty.
SET GLOBAL innodb_fast_shutdown = 0;
# Restart MySQL in read-only mode (different redo log capacity).
# restart: --innodb-read-only --innodb-redo-log-capacity=8M --log-error=MYSQLD_LOG_2
Pattern "Ignored the innodb-redo-log-capacity option in the Innodb read-only mode" found
SELECT @@innodb_redo_log_capacity;
@@innodb_redo_log_capacity
8388608
SET GLOBAL innodb_fast_shutdown = 0;
# Scenario 3
# Ensure to print warning in case --innodb_log_file_size is specified.
#
# restart: --innodb-read-only --innodb_log_file_size=4194304 --log-error=MYSQLD_LOG_3
Pattern "Ignored the innodb-redo-log-capacity option in the Innodb read-only mode" found
SET GLOBAL innodb_fast_shutdown = 0;
# Scenario 4
# Ensure to print warning in case --innodb_log_files_in_group is specified.
#
# restart: --innodb-read-only --innodb_log_files_in_group=4 --log-error=MYSQLD_LOG_4
Pattern "Ignored the innodb-redo-log-capacity option in the Innodb read-only mode" found
SET GLOBAL innodb_fast_shutdown = 0;
# Scenario 5
# Refuse to start in read-only mode without log files.
#
# Remove all redo log files.
Pattern "Cannot create redo log files in read-only mode" found
# Cleanup...
# restart
# Scenario 6
# Restart MySQL in read-only mode
# Ensure we do not allow to change the innodb_redo_log_capacity in read-only mode.
# Try to set some random value to innodb_redo_log_capacity
set global innodb_redo_log_capacity=60000000;
ERROR HY000: Cannot change the 'innodb-redo-log-capacity' system variable in read-only mode.
# Try to set default value to innodb_redo_log_capacity
set global innodb_redo_log_capacity=10485760;
ERROR HY000: Cannot change the 'innodb-redo-log-capacity' system variable in read-only mode.
# Cleanup...