6
6
--source include/not_embedded.inc
7
7
# Avoid CrashReporter popup on Mac
8
8
--source include/not_crashrep.inc
9
- # innodb-force-recovery-crash needs debug
9
+ # DBUG_EXECUTE_IF is needed
10
10
--source include/have_debug.inc
11
11
12
12
if (`SELECT @@innodb_log_file_size = 1048576`) {
@@ -17,7 +17,22 @@ if (`SELECT @@innodb_log_file_size = 1048576`) {
17
17
call mtr.add_suppression("InnoDB: Resizing redo log");
18
18
call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files");
19
19
call mtr.add_suppression("InnoDB: New log files created");
20
+ # This message is output by 10.0 and 10.1, not by 10.2
21
+ call mtr.add_suppression("InnoDB: The log sequence number in the ibdata files is higher than the log sequence number in the ib_logfiles");
20
22
call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles");
23
+ call mtr.add_suppression("syntax error in innodb_log_group_home_dir");
24
+ call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
25
+ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
26
+ call mtr.add_suppression("InnoDB: Plugin initialization aborted");
27
+ call mtr.add_suppression("InnoDB: innodb_read_only prevents crash recovery");
28
+ call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfiles");
29
+ call mtr.add_suppression("InnoDB: Cannot create log files in read-only mode");
30
+ call mtr.add_suppression("InnoDB: Only one log file found");
31
+ call mtr.add_suppression("InnoDB: Log file .*ib_logfile[01].* size");
32
+ call mtr.add_suppression("InnoDB: Unable to open .*ib_logfile0. to check native AIO read support");
33
+ # InnoDB shutdown after refused startup is not clean in 10.0 or 10.1!
34
+ call mtr.add_suppression("mysqld got signal 11");
35
+ call mtr.add_suppression("Attempting backtrace");
21
36
FLUSH TABLES;
22
37
--enable_query_log
23
38
@@ -42,118 +57,135 @@ SELECT * FROM t1;
42
57
INSERT INTO t1 VALUES (123);
43
58
44
59
let MYSQLD_DATADIR= `select @@datadir`;
45
- let SEARCH_ABORT = NOT FOUND;
46
- let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
47
- let $args=--innodb --unknown-option --loose-console --core-file > $SEARCH_FILE 2>&1;
48
- let $crash=--innodb --unknown-option --loose-console > $SEARCH_FILE 2>&1 --innodb-force-recovery-crash;
60
+ let SEARCH_RANGE= -50000;
61
+ let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
49
62
50
63
BEGIN;
51
64
DELETE FROM t1;
52
65
53
66
--source include/kill_mysqld.inc
54
67
55
- --error 2
56
- --exec $MYSQLD_CMD $args --innodb-log-group-home-dir=foo\;bar
68
+ --let $restart_parameters= --innodb-log-group-home-dir=foo\;bar
69
+ --source include/start_mysqld.inc
70
+ --error ER_UNKNOWN_STORAGE_ENGINE
71
+ SELECT * FROM t1;
57
72
let SEARCH_PATTERN= syntax error in innodb_log_group_home_dir;
58
73
--source include/search_pattern_in_file.inc
59
- --remove_file $SEARCH_FILE
60
74
61
- --echo --innodb-force-recovery-crash=1
62
- --error 3
63
- --exec $MYSQLD_CMD $crash=1
75
+ --let $restart_parameters= --debug=d,innodb_log_abort_1
76
+ --source include/restart_mysqld.inc
77
+ --error ER_UNKNOWN_STORAGE_ENGINE
78
+ SELECT * FROM t1;
64
79
let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
65
80
--source include/search_pattern_in_file.inc
66
- --remove_file $SEARCH_FILE
67
- --echo --innodb-force-recovery-crash=3
68
- --error 3
69
- --exec $MYSQLD_CMD $crash=3
81
+
82
+ --let $restart_parameters= --debug=d,innodb_log_abort_3
83
+ --source include/restart_mysqld.inc
84
+ --error ER_UNKNOWN_STORAGE_ENGINE
85
+ SELECT * FROM t1;
70
86
let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
71
87
--source include/search_pattern_in_file.inc
72
- --remove_file $SEARCH_FILE
73
88
74
- --error 2
75
- --exec $MYSQLD_CMD $args --innodb-read-only
89
+ --let $restart_parameters= --innodb-read-only
90
+ --source include/restart_mysqld.inc
91
+
92
+ --error ER_UNKNOWN_STORAGE_ENGINE
93
+ SELECT * FROM t1;
76
94
let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
77
95
--source include/search_pattern_in_file.inc
78
- --remove_file $SEARCH_FILE
79
96
80
- --echo --innodb-force-recovery-crash=4
81
- --error 3
82
- --exec $MYSQLD_CMD $crash=4
97
+ --let $restart_parameters= --debug=d,innodb_log_abort_4
98
+ --source include/restart_mysqld.inc
99
+ --error ER_UNKNOWN_STORAGE_ENGINE
100
+ SELECT * FROM t1;
83
101
let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
84
102
--source include/search_pattern_in_file.inc
85
103
let SEARCH_PATTERN= InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
86
104
--source include/search_pattern_in_file.inc
87
- --remove_file $SEARCH_FILE
88
- --echo --innodb-force-recovery-crash=5
89
- --error 3
90
- --exec $MYSQLD_CMD $crash=5
105
+
106
+ --let $restart_parameters= --debug=d,innodb_log_abort_5
107
+ --source include/restart_mysqld.inc
108
+ --error ER_UNKNOWN_STORAGE_ENGINE
109
+ SELECT * FROM t1;
91
110
let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
92
111
--source include/search_pattern_in_file.inc
93
112
let SEARCH_PATTERN= InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
94
113
--source include/search_pattern_in_file.inc
95
- --remove_file $SEARCH_FILE
96
114
97
- --error 2
98
- --exec $MYSQLD_CMD $args --innodb-read-only
115
+ --let $restart_parameters= --innodb-read-only
116
+ --source include/restart_mysqld.inc
117
+ --error ER_UNKNOWN_STORAGE_ENGINE
118
+ SELECT * FROM t1;
99
119
let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
100
120
--source include/search_pattern_in_file.inc
101
- --remove_file $SEARCH_FILE
102
121
103
- --echo --innodb-force-recovery-crash=6
104
- --error 3
105
- --exec $MYSQLD_CMD $crash=6
122
+ --let $restart_parameters= --debug=d,innodb_log_abort_6
123
+ --source include/restart_mysqld.inc
124
+ --error ER_UNKNOWN_STORAGE_ENGINE
125
+ SELECT * FROM t1;
126
+
106
127
let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
107
128
--source include/search_pattern_in_file.inc
108
129
let SEARCH_PATTERN= InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
109
130
--source include/search_pattern_in_file.inc
110
- --remove_file $SEARCH_FILE
111
- --echo --innodb-force-recovery-crash=7
112
- --error 3
113
- --exec $MYSQLD_CMD $crash=7
114
- # this crashes right after deleting all log files
115
- --remove_file $SEARCH_FILE
116
131
117
- --error 2
118
- --exec $MYSQLD_CMD $args --innodb-read-only
132
+ --let $restart_parameters= --debug=d,innodb_log_abort_7
133
+ --source include/restart_mysqld.inc
134
+ --error ER_UNKNOWN_STORAGE_ENGINE
135
+ SELECT * FROM t1;
136
+
137
+ # this aborts right after deleting all log files
138
+
139
+ --let $restart_parameters= --innodb-read-only
140
+ --source include/restart_mysqld.inc
141
+ --error ER_UNKNOWN_STORAGE_ENGINE
142
+ SELECT * FROM t1;
143
+
119
144
let SEARCH_PATTERN= InnoDB: Cannot create log files in read-only mode;
120
145
--source include/search_pattern_in_file.inc
121
- --remove_file $SEARCH_FILE
122
146
123
- --echo --innodb-force-recovery-crash=8
124
- --error 3
125
- --exec $MYSQLD_CMD $crash=8
147
+ --let $restart_parameters= --debug=d,innodb_log_abort_8
148
+ --source include/restart_mysqld.inc
149
+ --error ER_UNKNOWN_STORAGE_ENGINE
150
+ SELECT * FROM t1;
151
+
126
152
let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to;
127
153
--source include/search_pattern_in_file.inc
128
- --remove_file $SEARCH_FILE
129
- --echo --innodb-force-recovery-crash=9
130
- --error 3
131
- --exec $MYSQLD_CMD $crash=9
154
+
155
+ --let $restart_parameters= --debug=d,innodb_log_abort_9
156
+ --source include/restart_mysqld.inc
157
+ --error ER_UNKNOWN_STORAGE_ENGINE
158
+ SELECT * FROM t1;
159
+
132
160
let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to;
133
161
--source include/search_pattern_in_file.inc
134
- --remove_file $SEARCH_FILE
162
+ --source include/shutdown_mysqld.inc
135
163
136
164
# We should have perfectly synced files here.
137
165
# Rename the log files, and trigger an error in recovery.
138
166
--move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0
139
167
--move_file $MYSQLD_DATADIR/ib_logfile1 $MYSQLD_DATADIR/ib_logfile1_hidden
140
- --error 2
141
- --exec $MYSQLD_CMD $args
168
+
169
+ --let $restart_parameters=
170
+ --source include/start_mysqld.inc
171
+ --error ER_UNKNOWN_STORAGE_ENGINE
172
+ SELECT * FROM t1;
173
+
142
174
let SEARCH_PATTERN= InnoDB: Only one log file found;
143
175
--source include/search_pattern_in_file.inc
144
- --remove_file $SEARCH_FILE
145
176
--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101
146
177
147
178
perl;
148
179
die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/ib_logfile0");
149
180
print FILE "garbage";
150
181
close(FILE);
151
182
EOF
152
- --error 2
153
- --exec $MYSQLD_CMD $args
183
+
184
+ --source include/restart_mysqld.inc
185
+ --error ER_UNKNOWN_STORAGE_ENGINE
186
+ SELECT * FROM t1;
154
187
let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of innodb_page_size;
155
188
--source include/search_pattern_in_file.inc
156
- --remove_file $SEARCH_FILE
157
189
--remove_file $MYSQLD_DATADIR/ib_logfile0
158
190
--move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0
159
191
@@ -163,26 +195,28 @@ print FILE "junkfill" x 131072;
163
195
close(FILE);
164
196
EOF
165
197
166
- --error 2
167
- --exec $MYSQLD_CMD $args
198
+ --source include/restart_mysqld.inc
199
+ --error ER_UNKNOWN_STORAGE_ENGINE
200
+ SELECT * FROM t1;
201
+
168
202
let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files;
169
203
--source include/search_pattern_in_file.inc
170
- --remove_file $SEARCH_FILE
171
204
--remove_file $MYSQLD_DATADIR/ib_logfile1
172
205
--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101
173
206
--move_file $MYSQLD_DATADIR/ib_logfile1_hidden $MYSQLD_DATADIR/ib_logfile1
174
207
175
- --echo --innodb-force-recovery-crash=10
176
- --error 3
177
- --exec $MYSQLD_CMD $crash=10
208
+ --let $restart_parameters= --debug=d,innodb_log_abort_10
209
+ --source include/restart_mysqld.inc
210
+ --error ER_UNKNOWN_STORAGE_ENGINE
211
+ SELECT * FROM t1;
212
+
178
213
let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to;
179
214
--source include/search_pattern_in_file.inc
180
215
let SEARCH_PATTERN= InnoDB: Renaming log file .*ib_logfile101 to .*ib_logfile0;
181
216
--source include/search_pattern_in_file.inc
182
- --remove_file $SEARCH_FILE
183
217
184
218
--let $restart_parameters=
185
- --source include/start_mysqld .inc
219
+ --source include/restart_mysqld .inc
186
220
187
221
SELECT * FROM t1;
188
222
DROP TABLE t1;
0 commit comments