Skip to content

Commit 2de0e42

Browse files
committed
Import and adjust the InnoDB redo log tests from MySQL 5.7.
1 parent 0f34160 commit 2de0e42

22 files changed

+1214
-6
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Remove ibtmp* which are re-generated after each mysqld invocation
2+
# skip auto generated auto.cnf from list_files
3+
--remove_files_wildcard $bugdir ibtmp*
4+
--remove_files_wildcard $bugdir auto.cnf
5+
--list_files $bugdir
6+
--remove_files_wildcard $bugdir ibdata*
7+
--remove_files_wildcard $bugdir ib_logfile*
8+
--remove_files_wildcard $bugdir undo00*
9+
--copy_file $bugdir/bak_ibdata1 $bugdir/ibdata1
10+
--copy_file $bugdir/bak_ibdata2 $bugdir/ibdata2
11+
--copy_file $bugdir/bak_ib_logfile0 $bugdir/ib_logfile0
12+
--copy_file $bugdir/bak_ib_logfile1 $bugdir/ib_logfile1
13+
--copy_file $bugdir/bak_ib_logfile2 $bugdir/ib_logfile2
14+
--copy_file $bugdir/bak_undo001 $bugdir/undo001
15+
--copy_file $bugdir/bak_undo002 $bugdir/undo002
16+
--copy_file $bugdir/bak_undo003 $bugdir/undo003
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# redo log from before MySQL 5.7.9
2+
# redo log from before MySQL 5.7.9, with corrupted log checkpoint
3+
# redo log from before MySQL 5.7.9, with corrupted log block
4+
# redo log from "after" MySQL 5.7.9, but with invalid header checksum
5+
# distant future redo log format, with valid header checksum
6+
# valid header, but old-format checkpoint blocks
7+
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum
8+
# --innodb-force-recovery=6 (skip the entire redo log)
9+
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number
10+
# --innodb-force-recovery=6 (skip the entire redo log)
11+
# Test a corrupted MLOG_FILE_NAME record.
12+
# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2
13+
# Test a corrupted MLOG_FILE_NAME record.
14+
# valid header, invalid checkpoint 1, valid checkpoint 2
15+
ib_logfile0
16+
ib_logfile1
17+
ibdata1
18+
my.cnf
19+
my_restart.err
Lines changed: 344 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,344 @@
1+
# Testcase for the following bugs
2+
# Bug#16691130 - ASSERT WHEN INNODB_LOG_GROUP_HOME_DIR DOES NOT EXIST
3+
# Bug#16418661 - CHANGING NAME IN FOR INNODB_DATA_FILE_PATH SHOULD NOT SUCCEED WITH LOG FILES
4+
# Write tmp/log_file/my.cnf
5+
# Start mysqld without the possibility to create innodb_undo_tablespaces
6+
# Remove undo001,undo002,ibdata1,ibdata2,ib_logfile1,ib_logfile2,ib_logfile101
7+
my.cnf
8+
my_restart.err
9+
# Start mysqld with non existent innodb_log_group_home_dir
10+
# Remove ibdata1 & ibdata2
11+
my.cnf
12+
my_restart.err
13+
# Start mysqld to create tablespaces according to my.cnf
14+
# Backup tmp/logfile/*
15+
# 1. With ibdata2, Without ibdata1
16+
bak_ib_logfile0
17+
bak_ib_logfile1
18+
bak_ib_logfile2
19+
bak_ibdata1
20+
bak_ibdata2
21+
bak_undo001
22+
bak_undo002
23+
bak_undo003
24+
ib_buffer_pool
25+
ib_logfile0
26+
ib_logfile1
27+
ib_logfile2
28+
ibdata2
29+
my.cnf
30+
my_restart.err
31+
undo001
32+
undo002
33+
undo003
34+
# 2. With ibdata1, without ibdata2
35+
bak_ib_logfile0
36+
bak_ib_logfile1
37+
bak_ib_logfile2
38+
bak_ibdata1
39+
bak_ibdata2
40+
bak_undo001
41+
bak_undo002
42+
bak_undo003
43+
ib_buffer_pool
44+
ib_logfile0
45+
ib_logfile1
46+
ib_logfile2
47+
ibdata1
48+
ibdata2
49+
my.cnf
50+
my_restart.err
51+
undo001
52+
undo002
53+
undo003
54+
# 3. Without ibdata1 & ibdata2
55+
bak_ib_logfile0
56+
bak_ib_logfile1
57+
bak_ib_logfile2
58+
bak_ibdata1
59+
bak_ibdata2
60+
bak_undo001
61+
bak_undo002
62+
bak_undo003
63+
ib_buffer_pool
64+
ib_logfile0
65+
ib_logfile1
66+
ib_logfile2
67+
my.cnf
68+
my_restart.err
69+
undo001
70+
undo002
71+
undo003
72+
bak_ib_logfile0
73+
bak_ib_logfile1
74+
bak_ib_logfile2
75+
bak_ibdata1
76+
bak_ibdata2
77+
bak_undo001
78+
bak_undo002
79+
bak_undo003
80+
ib_buffer_pool
81+
ib_logfile0
82+
ib_logfile1
83+
ib_logfile2
84+
my.cnf
85+
my_restart.err
86+
undo001
87+
undo002
88+
undo003
89+
# 4. Without ibdata*, ib_logfile* and with undo00*
90+
bak_ib_logfile0
91+
bak_ib_logfile1
92+
bak_ib_logfile2
93+
bak_ibdata1
94+
bak_ibdata2
95+
bak_undo001
96+
bak_undo002
97+
bak_undo003
98+
ib_buffer_pool
99+
my.cnf
100+
my_restart.err
101+
undo001
102+
undo002
103+
undo003
104+
bak_ib_logfile0
105+
bak_ib_logfile1
106+
bak_ib_logfile2
107+
bak_ibdata1
108+
bak_ibdata2
109+
bak_undo001
110+
bak_undo002
111+
bak_undo003
112+
ib_buffer_pool
113+
my.cnf
114+
my_restart.err
115+
undo001
116+
undo002
117+
undo003
118+
# 5. Without ibdata*,ib_logfile* files & Without undo002
119+
bak_ib_logfile0
120+
bak_ib_logfile1
121+
bak_ib_logfile2
122+
bak_ibdata1
123+
bak_ibdata2
124+
bak_undo001
125+
bak_undo002
126+
bak_undo003
127+
ib_buffer_pool
128+
my.cnf
129+
my_restart.err
130+
undo001
131+
undo003
132+
bak_ib_logfile0
133+
bak_ib_logfile1
134+
bak_ib_logfile2
135+
bak_ibdata1
136+
bak_ibdata2
137+
bak_undo001
138+
bak_undo002
139+
bak_undo003
140+
ib_buffer_pool
141+
my.cnf
142+
my_restart.err
143+
undo001
144+
undo003
145+
# 6. Without ibdata*,ib_logfile* files & Without undo001, undo002
146+
bak_ib_logfile0
147+
bak_ib_logfile1
148+
bak_ib_logfile2
149+
bak_ibdata1
150+
bak_ibdata2
151+
bak_undo001
152+
bak_undo002
153+
bak_undo003
154+
ib_buffer_pool
155+
my.cnf
156+
my_restart.err
157+
undo003
158+
bak_ib_logfile0
159+
bak_ib_logfile1
160+
bak_ib_logfile2
161+
bak_ibdata1
162+
bak_ibdata2
163+
bak_undo001
164+
bak_undo002
165+
bak_undo003
166+
ib_buffer_pool
167+
my.cnf
168+
my_restart.err
169+
undo003
170+
# 7. With ibdata files & Without undo002
171+
bak_ib_logfile0
172+
bak_ib_logfile1
173+
bak_ib_logfile2
174+
bak_ibdata1
175+
bak_ibdata2
176+
bak_undo001
177+
bak_undo002
178+
bak_undo003
179+
ib_buffer_pool
180+
ib_logfile0
181+
ib_logfile1
182+
ib_logfile2
183+
ibdata1
184+
ibdata2
185+
my.cnf
186+
my_restart.err
187+
undo001
188+
undo003
189+
bak_ib_logfile0
190+
bak_ib_logfile1
191+
bak_ib_logfile2
192+
bak_ibdata1
193+
bak_ibdata2
194+
bak_undo001
195+
bak_undo002
196+
bak_undo003
197+
ib_buffer_pool
198+
ib_logfile0
199+
ib_logfile1
200+
ib_logfile2
201+
ibdata1
202+
ibdata2
203+
my.cnf
204+
my_restart.err
205+
undo001
206+
undo003
207+
# 8. With ibdata files & Without undo001, undo002
208+
bak_ib_logfile0
209+
bak_ib_logfile1
210+
bak_ib_logfile2
211+
bak_ibdata1
212+
bak_ibdata2
213+
bak_undo001
214+
bak_undo002
215+
bak_undo003
216+
ib_buffer_pool
217+
ib_logfile0
218+
ib_logfile1
219+
ib_logfile2
220+
ibdata1
221+
ibdata2
222+
my.cnf
223+
my_restart.err
224+
undo003
225+
bak_ib_logfile0
226+
bak_ib_logfile1
227+
bak_ib_logfile2
228+
bak_ibdata1
229+
bak_ibdata2
230+
bak_undo001
231+
bak_undo002
232+
bak_undo003
233+
ib_buffer_pool
234+
ib_logfile0
235+
ib_logfile1
236+
ib_logfile2
237+
ibdata1
238+
ibdata2
239+
my.cnf
240+
my_restart.err
241+
undo003
242+
# 9. Without ibdata*, without undo*, Without ib_logfile1 and with ib_logfile2
243+
bak_ib_logfile0
244+
bak_ib_logfile1
245+
bak_ib_logfile2
246+
bak_ibdata1
247+
bak_ibdata2
248+
bak_undo001
249+
bak_undo002
250+
bak_undo003
251+
ib_buffer_pool
252+
ib_logfile0
253+
ib_logfile2
254+
my.cnf
255+
my_restart.err
256+
bak_ib_logfile0
257+
bak_ib_logfile1
258+
bak_ib_logfile2
259+
bak_ibdata1
260+
bak_ibdata2
261+
bak_undo001
262+
bak_undo002
263+
bak_undo003
264+
ib_buffer_pool
265+
ib_logfile0
266+
ib_logfile2
267+
my.cnf
268+
my_restart.err
269+
# 11. With ibdata*, without ib_logfile1
270+
bak_ib_logfile0
271+
bak_ib_logfile1
272+
bak_ib_logfile2
273+
bak_ibdata1
274+
bak_ibdata2
275+
bak_undo001
276+
bak_undo002
277+
bak_undo003
278+
ib_buffer_pool
279+
ib_logfile0
280+
ib_logfile2
281+
ibdata1
282+
ibdata2
283+
my.cnf
284+
my_restart.err
285+
undo001
286+
undo002
287+
undo003
288+
bak_ib_logfile0
289+
bak_ib_logfile1
290+
bak_ib_logfile2
291+
bak_ibdata1
292+
bak_ibdata2
293+
bak_undo001
294+
bak_undo002
295+
bak_undo003
296+
ib_buffer_pool
297+
ib_logfile0
298+
ib_logfile2
299+
ibdata1
300+
ibdata2
301+
my.cnf
302+
my_restart.err
303+
undo001
304+
undo002
305+
undo003
306+
# 12. With ibdata*, without ib_logfile2
307+
bak_ib_logfile0
308+
bak_ib_logfile1
309+
bak_ib_logfile2
310+
bak_ibdata1
311+
bak_ibdata2
312+
bak_undo001
313+
bak_undo002
314+
bak_undo003
315+
ib_buffer_pool
316+
ib_logfile0
317+
ib_logfile1
318+
ibdata1
319+
ibdata2
320+
my.cnf
321+
my_restart.err
322+
undo001
323+
undo002
324+
undo003
325+
# Cleanup
326+
bak_ib_logfile0
327+
bak_ib_logfile1
328+
bak_ib_logfile2
329+
bak_ibdata1
330+
bak_ibdata2
331+
bak_undo001
332+
bak_undo002
333+
bak_undo003
334+
ib_buffer_pool
335+
ib_logfile0
336+
ib_logfile1
337+
ib_logfile2
338+
ibdata1
339+
ibdata2
340+
my.cnf
341+
my_restart.err
342+
undo001
343+
undo002
344+
undo003

0 commit comments

Comments
 (0)