Debian Codegraph @

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

raw
1 CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
2 BEGIN;
3 INSERT INTO t1 VALUES (42);
4 # Kill and restart: --innodb-redo-log-capacity=12M
5 SELECT * FROM t1;
6 a
7 INSERT INTO t1 VALUES (42);
8 BEGIN;
9 DELETE FROM t1;
10 # Kill and restart: --innodb-redo-log-capacity=15M
11 SELECT * FROM t1;
12 a
13 42
14 INSERT INTO t1 VALUES (123);
15 SET GLOBAL innodb_log_checkpoint_now = 1;
16 # Kill the server
17 ib_logfile0
18 ib_logfile1
19 #
20 # Crashing during recovery (common logic)
21 #
22 # Crash right before recovery starts:
23 # Expect "found"
24 Pattern "Completed space ID check" found
25 # Crash after log records applied:
26 # Expect "found"
27 Pattern "Starting to parse redo log at lsn = [0-9]+, whereas checkpoint_lsn = [0-9]+" found
28 # Crash right before recovery ends:
29 # Expect "found"
30 Pattern "Apply batch completed" found
31 # Crash after dynamic metadata apply:
32 # restart: --datadir=MYSQLD_DATADIR1 --log-error=MYSQLD_DATADIR1/mysqld.err
33 SHOW TABLES FROM test;
34 Tables_in_test
35 # Kill the server
36 #
37 # Crashing during upgrade itself
38 #
39 # Crash right after verifying clean shutdown:
40 # Expect "not found"
41 Pattern "Apply batch completed" not found
42 # Expect "found"
43 Pattern "Upgrading redo log: .* LSN=[0-9]+" found
44 # Crash right after deleting first log file:
45 # Expect "found"
46 Pattern "innodb_force_recovery_crash=7" found
47 ib_logfile1
48 # Expect "found"
49 Pattern "Missing ib_logfile0 in the directory" found
50 # restart: --datadir=MYSQLD_DATADIR1 --log-error=MYSQLD_DATADIR1/mysqld.err
51 SHOW TABLES FROM test;
52 Tables_in_test
53 # Kill the server
54 # Crash right after deleting all log files:
55 # Expect "found"
56 Pattern "innodb_force_recovery_crash=8" found
57 # restart: --datadir=MYSQLD_DATADIR1 --log-error=MYSQLD_DATADIR1/mysqld.err
58 SHOW TABLES FROM test;
59 Tables_in_test
60 # Kill the server
61 # Crash after creating #ib_redo0_tmp:
62 # Expect "found"
63 Pattern "innodb_force_recovery_crash=9" found
64 # restart: --datadir=MYSQLD_DATADIR1 --log-error=MYSQLD_DATADIR1/mysqld.err
65 SHOW TABLES FROM test;
66 Tables_in_test
67 # Kill the server
68 # Crash after renaming #ib_redo0_tmp to #ib_redo0:
69 # Expect "found"
70 Pattern "innodb_force_recovery_crash=10" found
71 # restart: --datadir=MYSQLD_DATADIR1 --log-error=MYSQLD_DATADIR1/mysqld.err
72 SHOW TABLES FROM test;
73 Tables_in_test
74 # Kill the server
75 # Crash after creating all log files:
76 # Expect "found"
77 Pattern "innodb_force_recovery_crash=11" found
78 # restart: --datadir=MYSQLD_DATADIR1 --log-error=MYSQLD_DATADIR1/mysqld.err
79 SHOW TABLES FROM test;
80 Tables_in_test
81 # Kill the server
82 # Crash after writing first checkpoint:
83 # Expect "found"
84 Pattern "innodb_force_recovery_crash=12" found
85 # restart: --datadir=MYSQLD_DATADIR1 --log-error=MYSQLD_DATADIR1/mysqld.err
86 SHOW TABLES FROM test;
87 Tables_in_test
88 # Kill the server
89 # Crash after marking redo files as initialized:
90 # Expect "found"
91 Pattern "innodb_force_recovery_crash=13" found
92 # restart: --datadir=MYSQLD_DATADIR1 --log-error=MYSQLD_DATADIR1/mysqld.err
93 SHOW TABLES FROM test;
94 Tables_in_test
95 # Kill the server
96
97 #
98 # Start MySQL after upgrade.
99 #
100 # restart: --innodb-redo-log-capacity=15M