Debian Codegraph @

mysql-test/suite/innodb_zip/r/wl5522_zip.result

raw
1 call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT\\.");
2 call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1` because the \\.ibd file is missing");
3 SET SESSION innodb_strict_mode=1;
4 CREATE TABLE t1
5 (a INT AUTO_INCREMENT PRIMARY KEY,
6 b char(22),
7 c varchar(255),
8 KEY (b))
9 ENGINE = InnoDB ROW_FORMAT=COMPRESSED ;
10 CREATE TEMPORARY TABLE t (b char(22),c varchar(255));
11 INSERT INTO t VALUES
12 ('Apa', 'Filler........'),
13 ('Banan', 'Filler........'), ('Cavalry', '..asdasdfaeraf'),
14 ('Devotion', 'asdfuihknaskdf'), ('Evolution', 'lsjndofiabsoibeg');
15 INSERT INTO t1 (b,c) SELECT b,c FROM t,seq_1_to_128;
16 DROP TEMPORARY TABLE t;
17 SELECT COUNT(*) FROM t1;
18 COUNT(*)
19 640
20 SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
21 a b c
22 636 Apa Filler........
23 631 Apa Filler........
24 626 Apa Filler........
25 SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
26 a b c
27 640 Evolution lsjndofiabsoibeg
28 639 Devotion asdfuihknaskdf
29 638 Cavalry ..asdasdfaeraf
30 db.opt
31 t1.frm
32 t1.ibd
33 # Restarting server
34 # restart
35 # Done restarting server
36 FLUSH TABLE t1 FOR EXPORT;
37 # List before copying files
38 db.opt
39 t1.cfg
40 t1.frm
41 t1.ibd
42 UNLOCK TABLES;
43 INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
44 SELECT COUNT(*) FROM t1;
45 COUNT(*)
46 1280
47 SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
48 a b c
49 1276 Apa Filler........
50 1271 Apa Filler........
51 1266 Apa Filler........
52 SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
53 a b c
54 1280 Evolution lsjndofiabsoibeg
55 1279 Devotion asdfuihknaskdf
56 1278 Cavalry ..asdasdfaeraf
57 # Restarting server
58 # restart
59 # Done restarting server
60 # List before t1 DISCARD
61 db.opt
62 t1.frm
63 t1.ibd
64 ALTER TABLE t1 DISCARD TABLESPACE;
65 # List after t1 DISCARD
66 db.opt
67 t1.frm
68 ALTER TABLE t1 IMPORT TABLESPACE;
69 ALTER TABLE t1 ENGINE InnoDB;
70 SELECT COUNT(*) FROM t1;
71 COUNT(*)
72 640
73 SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
74 a b c
75 636 Apa Filler........
76 631 Apa Filler........
77 626 Apa Filler........
78 SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
79 a b c
80 640 Evolution lsjndofiabsoibeg
81 639 Devotion asdfuihknaskdf
82 638 Cavalry ..asdasdfaeraf
83 db.opt
84 t1.cfg
85 t1.frm
86 t1.ibd
87 SELECT COUNT(*) FROM t1;
88 COUNT(*)
89 640
90 SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
91 a b c
92 636 Apa Filler........
93 631 Apa Filler........
94 626 Apa Filler........
95 SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
96 a b c
97 640 Evolution lsjndofiabsoibeg
98 639 Devotion asdfuihknaskdf
99 638 Cavalry ..asdasdfaeraf
100 DROP TABLE t1;
101 SET SESSION innodb_strict_mode=1;
102 CREATE TABLE t1(
103 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
104 c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
105 INSERT INTO t1(c2) VALUES(1);
106 ALTER TABLE t1 IMPORT TABLESPACE;
107 ERROR HY000: Tablespace for table 'test/t1' exists. Please DISCARD the tablespace before IMPORT
108 SELECT * FROM t1;
109 c1 c2
110 1 1
111 DROP TABLE t1;
112 CREATE TABLE t1(
113 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
114 c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
115 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
116 db.opt
117 t1.frm
118 t1.ibd
119 FLUSH TABLES t1 FOR EXPORT;
120 backup: t1
121 db.opt
122 t1.cfg
123 t1.frm
124 t1.ibd
125 UNLOCK TABLES;
126 DROP TABLE t1;
127 CREATE TABLE t1(
128 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
129 c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
130 ALTER TABLE t1 DISCARD TABLESPACE;
131 SELECT * FROM t1;
132 ERROR HY000: Tablespace has been discarded for table `t1`
133 restore: t1 .ibd and .cfg files
134 db.opt
135 t1.cfg
136 t1.frm
137 t1.ibd
138 ALTER TABLE t1 IMPORT TABLESPACE;
139 CHECK TABLE t1;
140 Table Op Msg_type Msg_text
141 test.t1 check status OK
142 SELECT COUNT(*) FROM t1;
143 COUNT(*)
144 16
145 DROP TABLE t1;
146 CREATE TABLE t1(
147 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
148 c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
149 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
150 db.opt
151 t1.frm
152 t1.ibd
153 FLUSH TABLES t1 FOR EXPORT;
154 SELECT COUNT(*) FROM t1;
155 COUNT(*)
156 16
157 backup: t1
158 db.opt
159 t1.cfg
160 t1.frm
161 t1.ibd
162 UNLOCK TABLES;
163 db.opt
164 t1.frm
165 t1.ibd
166 DROP TABLE t1;
167 CREATE TABLE t1(
168 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
169 c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
170 ALTER TABLE t1 DISCARD TABLESPACE;
171 SELECT * FROM t1;
172 ERROR HY000: Tablespace has been discarded for table `t1`
173 restore: t1 .ibd and .cfg files
174 db.opt
175 t1.cfg
176 t1.frm
177 t1.ibd
178 ALTER TABLE t1 IMPORT TABLESPACE;
179 CHECK TABLE t1;
180 Table Op Msg_type Msg_text
181 test.t1 check status OK
182 SELECT COUNT(*) FROM t1;
183 COUNT(*)
184 16
185 DROP TABLE t1;
186 CREATE TABLE t1(
187 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
188 c2 INT, INDEX(c2)) ENGINE=InnoDB
189 ROW_FORMAT=COMPRESSED;
190 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
191 FLUSH TABLES t1 FOR EXPORT;
192 backup: t1
193 db.opt
194 t1.cfg
195 t1.frm
196 t1.ibd
197 UNLOCK TABLES;
198 DROP TABLE t1;
199 CREATE TABLE t1(
200 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
201 c2 INT, INDEX(c2)) ENGINE=InnoDB
202 ROW_FORMAT=COMPRESSED;
203 ALTER TABLE t1 DISCARD TABLESPACE;
204 SELECT * FROM t1;
205 ERROR HY000: Tablespace has been discarded for table `t1`
206 restore: t1 .ibd and .cfg files
207 ALTER TABLE t1 IMPORT TABLESPACE;
208 CHECK TABLE t1;
209 Table Op Msg_type Msg_text
210 test.t1 check status OK
211 SELECT COUNT(*) FROM t1 WHERE c2 = 1;
212 COUNT(*)
213 16
214 DROP TABLE t1;
215 CREATE TABLE t1(
216 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
217 c2 INT, INDEX idx(c2)) ENGINE=InnoDB
218 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
219 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
220 FLUSH TABLES t1 FOR EXPORT;
221 backup: t1
222 UNLOCK TABLES;
223 DROP TABLE t1;
224 CREATE TABLE t1(
225 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
226 c2 INT, INDEX x(c2)) ENGINE=InnoDB
227 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
228 ALTER TABLE t1 DISCARD TABLESPACE;
229 SELECT * FROM t1;
230 ERROR HY000: Tablespace has been discarded for table `t1`
231 restore: t1 .ibd and .cfg files
232 ALTER TABLE t1 IMPORT TABLESPACE;
233 ERROR HY000: Schema mismatch (Index x not found in tablespace meta-data file.)
234 ALTER TABLE t1 DROP INDEX x;
235 Warnings:
236 Warning 1814 Tablespace has been discarded for table `t1`
237 ALTER TABLE t1 ADD INDEX idx(c2);
238 Warnings:
239 Warning 1814 Tablespace has been discarded for table `t1`
240 restore: t1 .ibd and .cfg files
241 ALTER TABLE t1 IMPORT TABLESPACE;
242 CHECK TABLE t1;
243 Table Op Msg_type Msg_text
244 test.t1 check status OK
245 SELECT * FROM t1;
246 c1 c2
247 1 1
248 2 1
249 3 1
250 4 1
251 5 1
252 6 1
253 7 1
254 8 1
255 9 1
256 10 1
257 11 1
258 12 1
259 13 1
260 14 1
261 15 1
262 16 1
263 unlink: t1.cfg
264 DROP TABLE t1;
265 SET GLOBAL innodb_file_per_table = 0;
266 Warnings:
267 Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
268 CREATE TABLE t1(
269 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
270 c2 INT) ENGINE=InnoDB;
271 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
272 SHOW CREATE TABLE t1;
273 Table Create Table
274 t1 CREATE TABLE `t1` (
275 `c1` int(11) NOT NULL AUTO_INCREMENT,
276 `c2` int(11) DEFAULT NULL,
277 PRIMARY KEY (`c1`)
278 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
279 FLUSH TABLES t1 FOR EXPORT;
280 Warnings:
281 Warning 1809 Table `test`.`t1` in system tablespace
282 UNLOCK TABLES;
283 DROP TABLE t1;
284 SET GLOBAL innodb_file_per_table = 1;
285 Warnings:
286 Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
287 CREATE TABLE t1(
288 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
289 c2 INT, INDEX idx(c2)) ENGINE=InnoDB
290 ROW_FORMAT=COMPRESSED;
291 INSERT INTO t1 SELECT seq,1 FROM seq_1_to_16;
292 SHOW CREATE TABLE t1;
293 Table Create Table
294 t1 CREATE TABLE `t1` (
295 `c1` int(11) NOT NULL AUTO_INCREMENT,
296 `c2` int(11) DEFAULT NULL,
297 PRIMARY KEY (`c1`),
298 KEY `idx` (`c2`)
299 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=COMPRESSED
300 FLUSH TABLES t1 FOR EXPORT;
301 backup: t1
302 UNLOCK TABLES;
303 DROP TABLE t1;
304 CREATE TABLE t1(
305 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
306 c2 INT) ENGINE=InnoDB
307 ROW_FORMAT=COMPRESSED;
308 ALTER TABLE t1 DISCARD TABLESPACE;
309 SELECT * FROM t1;
310 ERROR HY000: Tablespace has been discarded for table `t1`
311 restore: t1 .ibd and .cfg files
312 ALTER TABLE t1 IMPORT TABLESPACE;
313 ERROR HY000: Schema mismatch (Number of indexes don't match, table has 1 indexes but the tablespace meta-data file has 2 indexes)
314 unlink: t1.ibd
315 unlink: t1.cfg
316 DROP TABLE t1;
317 CREATE TABLE t1(
318 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
319 c2 INT,
320 c3 INT, INDEX idx(c2)) ENGINE=InnoDB
321 ROW_FORMAT=COMPRESSED;
322 ALTER TABLE t1 DISCARD TABLESPACE;
323 SELECT * FROM t1;
324 ERROR HY000: Tablespace has been discarded for table `t1`
325 restore: t1 .ibd and .cfg files
326 ALTER TABLE t1 IMPORT TABLESPACE;
327 ERROR HY000: Schema mismatch (Column c3 not found in tablespace.)
328 unlink: t1.ibd
329 unlink: t1.cfg
330 DROP TABLE t1;
331 CREATE TABLE t1(
332 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
333 c2 BIGINT, INDEX idx(c2)) ENGINE=InnoDB
334 ROW_FORMAT=COMPRESSED;
335 ALTER TABLE t1 DISCARD TABLESPACE;
336 SELECT * FROM t1;
337 ERROR HY000: Tablespace has been discarded for table `t1`
338 restore: t1 .ibd and .cfg files
339 ALTER TABLE t1 IMPORT TABLESPACE;
340 ERROR HY000: Schema mismatch (Column c2 precise type mismatch, it's 0X408 in the table and 0X403 in the tablespace meta file)
341 unlink: t1.ibd
342 unlink: t1.cfg
343 DROP TABLE t1;
344 CREATE TABLE t1(
345 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
346 c2 INT, INDEX idx(c2)) ENGINE=InnoDB
347 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
348 ALTER TABLE t1 DISCARD TABLESPACE;
349 SELECT * FROM t1;
350 ERROR HY000: Tablespace has been discarded for table `t1`
351 restore: t1 .ibd and .cfg files
352 ALTER TABLE t1 IMPORT TABLESPACE;
353 ERROR HY000: Schema mismatch
354 unlink: t1.ibd
355 unlink: t1.cfg
356 DROP TABLE t1;
357 CREATE TABLE t1(
358 c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
359 c2 INT, INDEX idx(c2)) ENGINE=InnoDB
360 ROW_FORMAT=COMPRESSED;
361 ALTER TABLE t1 DISCARD TABLESPACE;
362 SELECT * FROM t1;
363 ERROR HY000: Tablespace has been discarded for table `t1`
364 restore: t1 .ibd and .cfg files
365 ALTER TABLE t1 IMPORT TABLESPACE;
366 CHECK TABLE t1;
367 Table Op Msg_type Msg_text
368 test.t1 check status OK
369 unlink: t1.cfg
370 SHOW CREATE TABLE t1;
371 Table Create Table
372 t1 CREATE TABLE `t1` (
373 `c1` int(11) NOT NULL AUTO_INCREMENT,
374 `c2` int(11) DEFAULT NULL,
375 PRIMARY KEY (`c1`),
376 KEY `idx` (`c2`)
377 ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci ROW_FORMAT=COMPRESSED
378 SELECT * FROM t1;
379 c1 c2
380 1 1
381 2 1
382 3 1
383 4 1
384 5 1
385 6 1
386 7 1
387 8 1
388 9 1
389 10 1
390 11 1
391 12 1
392 13 1
393 14 1
394 15 1
395 16 1
396 DROP TABLE t1;
397 call mtr.add_suppression("Got error -1 when reading table '.*'");
398 call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'");
399 call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");