Debian Codegraph @

mysql-test/suite/maria/maria-recovery.result

raw
1 set global aria_log_file_size=4294959104;
2 drop database if exists mysqltest;
3 create database mysqltest;
4 connect admin, localhost, root,,mysqltest,,;
5 connection default;
6 use mysqltest;
7 connection default;
8 connection admin;
9 * shut down mysqld, removed logs, restarted it
10 connection default;
11 create table t1 (a varchar(1000)) engine=aria;
12 * TEST of REDO: see if recovery can reconstruct if we give it an old table
13 connection admin;
14 * copied t1 for feeding_recovery
15 connection default;
16 insert into t1 values ("00000000");
17 connection admin;
18 flush table t1;
19 * copied t1 for comparison
20 connection default;
21 connection admin;
22 SET SESSION debug_dbug="+d,maria_flush_whole_log,maria_crash";
23 * crashing mysqld intentionally
24 set global aria_checkpoint_interval=1;
25 ERROR HY000: Lost connection to server during query
26 * copied t1 back for feeding_recovery
27 * recovery happens
28 check table t1 extended;
29 Table Op Msg_type Msg_text
30 mysqltest.t1 check status OK
31 * testing that checksum after recovery is as expected
32 Checksum-check
33 ok
34 * compared t1 to old version
35 connection default;
36 use mysqltest;
37 select * from t1;
38 a
39 00000000
40 * TEST of REDO+UNDO: normal recovery test (no moving tables under its feet)
41 insert into t1 values ("00000000");
42 connection admin;
43 flush table t1;
44 * copied t1 for comparison
45 connection default;
46 lock tables t1 write;
47 insert into t1 values ("aaaaaaaaa");
48 connection admin;
49 SET SESSION debug_dbug="+d,maria_crash";
50 * crashing mysqld intentionally
51 set global aria_checkpoint_interval=1;
52 ERROR HY000: Lost connection to server during query
53 * recovery happens
54 check table t1 extended;
55 Table Op Msg_type Msg_text
56 mysqltest.t1 check status OK
57 * testing that checksum after recovery is as expected
58 Checksum-check
59 ok
60 connection default;
61 use mysqltest;
62 select * from t1;
63 a
64 00000000
65 00000000
66 insert into t1 values ("00000000");
67 connection admin;
68 flush table t1;
69 * copied t1 for comparison
70 connection default;
71 lock tables t1 write;
72 insert into t1 values ("aaaaaaaaa");
73 connection admin;
74 SET SESSION debug_dbug="+d,maria_flush_whole_page_cache,maria_crash";
75 * crashing mysqld intentionally
76 set global aria_checkpoint_interval=1;
77 ERROR HY000: Lost connection to server during query
78 * recovery happens
79 check table t1 extended;
80 Table Op Msg_type Msg_text
81 mysqltest.t1 check status OK
82 * testing that checksum after recovery is as expected
83 Checksum-check
84 ok
85 connection default;
86 use mysqltest;
87 select * from t1;
88 a
89 00000000
90 00000000
91 00000000
92 insert into t1 values ("00000000");
93 connection admin;
94 flush table t1;
95 * copied t1 for comparison
96 connection default;
97 lock tables t1 write;
98 insert into t1 values ("aaaaaaaaa");
99 connection admin;
100 SET SESSION debug_dbug="+d,maria_flush_states,maria_flush_whole_log,maria_crash";
101 * crashing mysqld intentionally
102 set global aria_checkpoint_interval=1;
103 ERROR HY000: Lost connection to server during query
104 * recovery happens
105 check table t1 extended;
106 Table Op Msg_type Msg_text
107 mysqltest.t1 check status OK
108 * testing that checksum after recovery is as expected
109 Checksum-check
110 ok
111 connection default;
112 use mysqltest;
113 select * from t1;
114 a
115 00000000
116 00000000
117 00000000
118 00000000
119 insert into t1 values ("00000000");
120 connection admin;
121 flush table t1;
122 * copied t1 for comparison
123 connection default;
124 lock tables t1 write;
125 insert into t1 values ("aaaaaaaaa");
126 connection admin;
127 SET SESSION debug_dbug="+d,maria_flush_whole_log,maria_crash";
128 * crashing mysqld intentionally
129 set global aria_checkpoint_interval=1;
130 ERROR HY000: Lost connection to server during query
131 * recovery happens
132 check table t1 extended;
133 Table Op Msg_type Msg_text
134 mysqltest.t1 check status OK
135 * testing that checksum after recovery is as expected
136 Checksum-check
137 ok
138 connection default;
139 use mysqltest;
140 select * from t1;
141 a
142 00000000
143 00000000
144 00000000
145 00000000
146 00000000
147 drop table t1;
148 * TEST of two REDOs for same page in one REDO group
149 connection default;
150 connection admin;
151 * shut down mysqld, removed logs, restarted it
152 connection default;
153 CREATE TABLE t1 (
154 i int,
155 b blob default NULL,
156 c varchar(6000) default NULL
157 ) ENGINE=ARIA CHECKSUM=1;
158 connection admin;
159 * copied t1 for feeding_recovery
160 connection default;
161 INSERT INTO t1 VALUES (1, REPEAT('a', 5000), REPEAT('b', 5000));
162 UPDATE t1 SET i=3, b=CONCAT(b,'c') WHERE i=1;
163 SELECT LENGTH(b) FROM t1 WHERE i=3;
164 LENGTH(b)
165 5001
166 connection admin;
167 flush table t1;
168 * copied t1 for comparison
169 connection default;
170 connection admin;
171 SET SESSION debug_dbug="+d,maria_flush_whole_log,maria_crash";
172 * crashing mysqld intentionally
173 set global aria_checkpoint_interval=1;
174 ERROR HY000: Lost connection to server during query
175 * copied t1 back for feeding_recovery
176 * recovery happens
177 check table t1 extended;
178 Table Op Msg_type Msg_text
179 mysqltest.t1 check status OK
180 * testing that checksum after recovery is as expected
181 Checksum-check
182 ok
183 connection default;
184 use mysqltest;
185 SELECT LENGTH(b) FROM t1 WHERE i=3;
186 LENGTH(b)
187 5001
188 drop table t1;
189 * TEST of INSERT vs state.auto_increment
190 connection default;
191 connection admin;
192 * shut down mysqld, removed logs, restarted it
193 connection default;
194 CREATE TABLE t1 (
195 i int auto_increment primary key,
196 c varchar(6),
197 key(c)
198 ) ENGINE=ARIA;
199 insert into t1 values(null,"b");
200 connection admin;
201 * copied t1 for feeding_recovery
202 connection default;
203 insert into t1 values(null,"a"), (null,"c"), (null,"d");
204 delete from t1 where c="d";
205 connection admin;
206 flush table t1;
207 * copied t1 for comparison
208 connection default;
209 connection admin;
210 SET SESSION debug_dbug="+d,maria_flush_whole_log,maria_crash";
211 * crashing mysqld intentionally
212 set global aria_checkpoint_interval=1;
213 ERROR HY000: Lost connection to server during query
214 * copied t1 back for feeding_recovery
215 * recovery happens
216 check table t1 extended;
217 Table Op Msg_type Msg_text
218 mysqltest.t1 check status OK
219 * testing that checksum after recovery is as expected
220 Checksum-check
221 ok
222 connection default;
223 use mysqltest;
224 show create table t1;
225 Table Create Table
226 t1 CREATE TABLE `t1` (
227 `i` int(11) NOT NULL AUTO_INCREMENT,
228 `c` varchar(6) DEFAULT NULL,
229 PRIMARY KEY (`i`),
230 KEY `c` (`c`)
231 ) ENGINE=Aria AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
232 * TEST of UPDATE vs state.auto_increment
233 connection admin;
234 * copied t1 for feeding_recovery
235 connection default;
236 update t1 set i=15 where c="a";
237 connection admin;
238 flush table t1;
239 * copied t1 for comparison
240 connection default;
241 connection admin;
242 SET SESSION debug_dbug="+d,maria_flush_whole_log,maria_crash";
243 * crashing mysqld intentionally
244 set global aria_checkpoint_interval=1;
245 ERROR HY000: Lost connection to server during query
246 * copied t1 back for feeding_recovery
247 * recovery happens
248 check table t1 extended;
249 Table Op Msg_type Msg_text
250 mysqltest.t1 check status OK
251 * testing that checksum after recovery is as expected
252 Checksum-check
253 ok
254 connection default;
255 use mysqltest;
256 show create table t1;
257 Table Create Table
258 t1 CREATE TABLE `t1` (
259 `i` int(11) NOT NULL AUTO_INCREMENT,
260 `c` varchar(6) DEFAULT NULL,
261 PRIMARY KEY (`i`),
262 KEY `c` (`c`)
263 ) ENGINE=Aria AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
264 * TEST of INSERT's rollback vs state.auto_increment
265 connection admin;
266 flush table t1;
267 * copied t1 for comparison
268 connection default;
269 lock tables t1 write;
270 insert into t1 values(null, "e");
271 connection admin;
272 SET SESSION debug_dbug="+d,maria_flush_whole_log,maria_crash";
273 * crashing mysqld intentionally
274 set global aria_checkpoint_interval=1;
275 ERROR HY000: Lost connection to server during query
276 * recovery happens
277 check table t1 extended;
278 Table Op Msg_type Msg_text
279 mysqltest.t1 check status OK
280 * testing that checksum after recovery is as expected
281 Checksum-check
282 ok
283 connection default;
284 use mysqltest;
285 show create table t1;
286 Table Create Table
287 t1 CREATE TABLE `t1` (
288 `i` int(11) NOT NULL AUTO_INCREMENT,
289 `c` varchar(6) DEFAULT NULL,
290 PRIMARY KEY (`i`),
291 KEY `c` (`c`)
292 ) ENGINE=Aria AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1
293 insert into t1 values(null, "f");
294 drop table t1;
295 Test that bulk insert works with recovery
296 CREATE TABLE t1 (i int, key(i)) TRANSACTIONAL=1 ENGINE=ARIA;
297 CREATE TABLE t2 (i int, key(i)) TRANSACTIONAL=1 ENGINE=ARIA;
298 connection admin;
299 * copied t2 for feeding_recovery
300 * copied t1 for feeding_recovery
301 connection default;
302 insert into t2 values
303 (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
304 (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
305 (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
306 (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
307 (0), (1), (3), (3), (4), (5), (6), (7), (8), (9),
308 (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
309 (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
310 (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
311 (0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
312 (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
313 insert into t1 select * from t2;
314 insert into t2 select * from t2;
315 connection admin;
316 SET SESSION debug_dbug="+d,maria_flush_whole_log,maria_crash";
317 * crashing mysqld intentionally
318 set global aria_checkpoint_interval=1;
319 ERROR HY000: Lost connection to server during query
320 * recovery happens
321 connection default;
322 use mysqltest;
323 select count(*) from t1;
324 count(*)
325 100
326 select count(*) from t2;
327 count(*)
328 200
329 check table t2;
330 Table Op Msg_type Msg_text
331 mysqltest.t2 check status OK
332 drop table t1,t2;
333 drop database mysqltest_for_feeding_recovery;
334 drop database mysqltest_for_comparison;
335 drop database mysqltest;