1SET GLOBAL innodb_file_per_table = 1;
2SELECT @@innodb_file_per_table;
3@@innodb_file_per_table
41
5DROP DATABASE IF EXISTS test_wl5522;
6Warnings:
7Note	1008	Can't drop database 'test_wl5522'; database doesn't exist
8CREATE DATABASE test_wl5522;
9SET SESSION debug="+d,ib_discard_before_commit_crash";
10CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB;
11INSERT INTO test_wl5522.t1 VALUES(1),(2),(3);
12ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
13ERROR HY000: Lost connection to MySQL server during query
14SET SESSION debug="-d,ib_discard_before_commit_crash";
15DROP TABLE test_wl5522.t1;
16SET GLOBAL innodb_file_per_table = 1;
17SELECT @@innodb_file_per_table;
18@@innodb_file_per_table
191
20SET SESSION debug="+d,ib_discard_after_commit_crash";
21CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB;
22INSERT INTO test_wl5522.t1 VALUES(1),(2),(3);
23ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
24ERROR HY000: Lost connection to MySQL server during query
25SET SESSION debug="-d,ib_discard_after_commit_crash";
26DROP TABLE test_wl5522.t1;
27SET GLOBAL innodb_file_per_table = 1;
28SELECT @@innodb_file_per_table;
29@@innodb_file_per_table
301
31CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
32INSERT INTO test_wl5522.t1 VALUES (1), (2), (3), (4);
33FLUSH TABLES test_wl5522.t1 FOR EXPORT;
34backup: t1
35UNLOCK TABLES;
36DROP TABLE test_wl5522.t1;
37CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
38INSERT INTO test_wl5522.t1 VALUES (1);
39ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
40SELECT COUNT(*) FROM test_wl5522.t1;
41ERROR HY000: Tablespace has been discarded for table 't1'
42restore: t1 .ibd and .cfg files
43SET SESSION debug="+d,ib_import_before_commit_crash";
44SELECT * FROM test_wl5522.t1;
45ERROR HY000: Tablespace has been discarded for table 't1'
46ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
47ERROR HY000: Lost connection to MySQL server during query
48SET SESSION debug="-d,ib_import_before_commit_crash";
49SET SESSION debug="+d,ib_import_before_checkpoint_crash";
50SELECT COUNT(*) FROM test_wl5522.t1;
51ERROR HY000: Tablespace has been discarded for table 't1'
52ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
53ERROR HY000: Lost connection to MySQL server during query
54unlink: t1.ibd
55unlink: t1.cfg
56# Restart and reconnect to the server
57SET SESSION debug="-d,ib_import_before_checkpoint_crash";
58DROP TABLE test_wl5522.t1;
59SET GLOBAL innodb_file_per_table = 1;
60SELECT @@innodb_file_per_table;
61@@innodb_file_per_table
621
63CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
64ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
65restore: t1 .ibd and .cfg files
66ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
67CHECK TABLE test_wl5522.t1;
68Table	Op	Msg_type	Msg_text
69test_wl5522.t1	check	status	OK
70SELECT COUNT(*) FROM test_wl5522.t1;
71COUNT(*)
724
73INSERT INTO test_wl5522.t1 VALUES(400), (500), (600);
74SELECT * FROM test_wl5522.t1;
75c1
761
772
783
794
80400
81500
82600
83DROP TABLE test_wl5522.t1;
84CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
85INSERT INTO test_wl5522.t1 VALUES (1);
86SET SESSION debug="+d,ib_export_io_write_failure_1";
87FLUSH TABLES test_wl5522.t1 FOR EXPORT;
88Warnings:
89Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
90Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
91UNLOCK TABLES;
92SET SESSION debug="-d,ib_export_io_write_failure_1";
93DROP TABLE test_wl5522.t1;
94CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
95INSERT INTO test_wl5522.t1 VALUES (1);
96SET SESSION debug="+d,ib_export_io_write_failure_2";
97FLUSH TABLES test_wl5522.t1 FOR EXPORT;
98Warnings:
99Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
100Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
101UNLOCK TABLES;
102SET SESSION debug="-d,ib_export_io_write_failure_2";
103DROP TABLE test_wl5522.t1;
104CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
105INSERT INTO test_wl5522.t1 VALUES (1);
106SET SESSION debug="+d,ib_export_io_write_failure_3";
107FLUSH TABLES test_wl5522.t1 FOR EXPORT;
108Warnings:
109Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
110Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
111UNLOCK TABLES;
112SET SESSION debug="-d,ib_export_io_write_failure_3";
113DROP TABLE test_wl5522.t1;
114CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
115INSERT INTO test_wl5522.t1 VALUES (1);
116SET SESSION debug="+d,ib_export_io_write_failure_4";
117FLUSH TABLES test_wl5522.t1 FOR EXPORT;
118Warnings:
119Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
120Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
121UNLOCK TABLES;
122SET SESSION debug="-d,ib_export_io_write_failure_4";
123DROP TABLE test_wl5522.t1;
124CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
125INSERT INTO test_wl5522.t1 VALUES (1);
126SET SESSION debug="+d,ib_export_io_write_failure_5";
127FLUSH TABLES test_wl5522.t1 FOR EXPORT;
128Warnings:
129Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
130Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
131UNLOCK TABLES;
132SET SESSION debug="-d,ib_export_io_write_failure_5";
133DROP TABLE test_wl5522.t1;
134CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
135INSERT INTO test_wl5522.t1 VALUES (1);
136SET SESSION debug="+d,ib_export_io_write_failure_6";
137FLUSH TABLES test_wl5522.t1 FOR EXPORT;
138Warnings:
139Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
140Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
141UNLOCK TABLES;
142SET SESSION debug="-d,ib_export_io_write_failure_6";
143DROP TABLE test_wl5522.t1;
144CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
145INSERT INTO test_wl5522.t1 VALUES (1);
146SET SESSION debug="+d,ib_export_io_write_failure_7";
147FLUSH TABLES test_wl5522.t1 FOR EXPORT;
148Warnings:
149Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
150Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
151UNLOCK TABLES;
152SET SESSION debug="-d,ib_export_io_write_failure_7";
153DROP TABLE test_wl5522.t1;
154CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
155INSERT INTO test_wl5522.t1 VALUES (1);
156SET SESSION debug="+d,ib_export_io_write_failure_8";
157FLUSH TABLES test_wl5522.t1 FOR EXPORT;
158Warnings:
159Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
160Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
161UNLOCK TABLES;
162SET SESSION debug="-d,ib_export_io_write_failure_8";
163DROP TABLE test_wl5522.t1;
164CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
165INSERT INTO test_wl5522.t1 VALUES (1);
166SET SESSION debug="+d,ib_export_io_write_failure_9";
167FLUSH TABLES test_wl5522.t1 FOR EXPORT;
168Warnings:
169Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
170Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
171UNLOCK TABLES;
172SET SESSION debug="-d,ib_export_io_write_failure_9";
173DROP TABLE test_wl5522.t1;
174CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
175INSERT INTO test_wl5522.t1 VALUES (1);
176SET SESSION debug="+d,ib_export_io_write_failure_10";
177FLUSH TABLES test_wl5522.t1 FOR EXPORT;
178Warnings:
179Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
180Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
181UNLOCK TABLES;
182SET SESSION debug="-d,ib_export_io_write_failure_10";
183DROP TABLE test_wl5522.t1;
184CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
185INSERT INTO test_wl5522.t1 VALUES (1);
186SET SESSION debug="+d,ib_export_io_write_failure_11";
187FLUSH TABLES test_wl5522.t1 FOR EXPORT;
188Warnings:
189Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
190Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
191UNLOCK TABLES;
192SET SESSION debug="-d,ib_export_io_write_failure_11";
193DROP TABLE test_wl5522.t1;
194CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
195INSERT INTO test_wl5522.t1 VALUES (1);
196SET SESSION debug="+d,ib_export_io_write_failure_12";
197FLUSH TABLES test_wl5522.t1 FOR EXPORT;
198Warnings:
199Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
200Warning	1811	InnoDB: IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
201UNLOCK TABLES;
202SET SESSION debug="-d,ib_export_io_write_failure_12";
203DROP TABLE test_wl5522.t1;
204CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
205INSERT INTO test_wl5522.t1 VALUES (100), (200), (300);
206SELECT COUNT(*) FROM test_wl5522.t1;
207COUNT(*)
2083
209FLUSH TABLES test_wl5522.t1 FOR EXPORT;
210backup: t1
211UNLOCK TABLES;
212DROP TABLE test_wl5522.t1;
213CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
214INSERT INTO test_wl5522.t1 VALUES (1);
215ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
216SELECT COUNT(*) FROM test_wl5522.t1;
217ERROR HY000: Tablespace has been discarded for table 't1'
218SET SESSION debug="+d,ib_import_io_read_error_1";
219restore: t1 .cfg file
220ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
221ERROR HY000: IO Read error: while reading index fields.
222SET SESSION debug="-d,ib_import_io_read_error_1";
223DROP TABLE test_wl5522.t1;
224CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
225INSERT INTO test_wl5522.t1 VALUES (1);
226ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
227SELECT COUNT(*) FROM test_wl5522.t1;
228ERROR HY000: Tablespace has been discarded for table 't1'
229SET SESSION debug="+d,ib_import_io_read_error_2";
230restore: t1 .cfg file
231ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
232ERROR HY000: IO Read error: while reading index meta-data, expected to read 44 bytes but read only 0 bytes
233SET SESSION debug="-d,ib_import_io_read_error_2";
234DROP TABLE test_wl5522.t1;
235CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
236INSERT INTO test_wl5522.t1 VALUES (1);
237ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
238SELECT COUNT(*) FROM test_wl5522.t1;
239ERROR HY000: Tablespace has been discarded for table 't1'
240SET SESSION debug="+d,ib_import_io_read_error_3";
241restore: t1 .cfg file
242ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
243ERROR HY000: IO Read error: while reading number of indexes.
244SET SESSION debug="-d,ib_import_io_read_error_3";
245DROP TABLE test_wl5522.t1;
246CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
247INSERT INTO test_wl5522.t1 VALUES (1);
248ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
249SELECT COUNT(*) FROM test_wl5522.t1;
250ERROR HY000: Tablespace has been discarded for table 't1'
251SET SESSION debug="+d,ib_import_io_read_error_4";
252restore: t1 .cfg file
253ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
254ERROR HY000: IO Read error: while reading table column meta-data.
255SET SESSION debug="-d,ib_import_io_read_error_4";
256DROP TABLE test_wl5522.t1;
257CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
258INSERT INTO test_wl5522.t1 VALUES (1);
259ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
260SELECT COUNT(*) FROM test_wl5522.t1;
261ERROR HY000: Tablespace has been discarded for table 't1'
262SET SESSION debug="+d,ib_import_io_read_error_5";
263restore: t1 .cfg file
264ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
265ERROR HY000: IO Read error: while reading meta-data export hostname length.
266SET SESSION debug="-d,ib_import_io_read_error_5";
267DROP TABLE test_wl5522.t1;
268CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
269INSERT INTO test_wl5522.t1 VALUES (1);
270ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
271SELECT COUNT(*) FROM test_wl5522.t1;
272ERROR HY000: Tablespace has been discarded for table 't1'
273SET SESSION debug="+d,ib_import_io_read_error_6";
274restore: t1 .cfg file
275ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
276ERROR HY000: IO Read error: while reading meta-data table name length.
277SET SESSION debug="-d,ib_import_io_read_error_6";
278DROP TABLE test_wl5522.t1;
279CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
280INSERT INTO test_wl5522.t1 VALUES (1);
281ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
282SELECT COUNT(*) FROM test_wl5522.t1;
283ERROR HY000: Tablespace has been discarded for table 't1'
284SET SESSION debug="+d,ib_import_io_read_error_7";
285restore: t1 .cfg file
286ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
287ERROR HY000: IO Read error: while reading autoinc value.
288SET SESSION debug="-d,ib_import_io_read_error_7";
289DROP TABLE test_wl5522.t1;
290CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
291INSERT INTO test_wl5522.t1 VALUES (1);
292ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
293SELECT COUNT(*) FROM test_wl5522.t1;
294ERROR HY000: Tablespace has been discarded for table 't1'
295SET SESSION debug="+d,ib_import_io_read_error_8";
296restore: t1 .cfg file
297ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
298ERROR HY000: IO Read error: while reading meta-data header.
299SET SESSION debug="-d,ib_import_io_read_error_8";
300DROP TABLE test_wl5522.t1;
301CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
302INSERT INTO test_wl5522.t1 VALUES (1);
303ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
304SELECT COUNT(*) FROM test_wl5522.t1;
305ERROR HY000: Tablespace has been discarded for table 't1'
306SET SESSION debug="+d,ib_import_io_read_error_9";
307restore: t1 .cfg file
308ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
309ERROR HY000: IO Read error: while reading meta-data version.
310SET SESSION debug="-d,ib_import_io_read_error_9";
311DROP TABLE test_wl5522.t1;
312CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
313INSERT INTO test_wl5522.t1 VALUES (1);
314ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
315SELECT COUNT(*) FROM test_wl5522.t1;
316ERROR HY000: Tablespace has been discarded for table 't1'
317SET SESSION debug="+d,ib_import_string_read_error";
318restore: t1 .cfg file
319ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
320ERROR HY000: IO Read error: while parsing export hostname.
321SET SESSION debug="-d,ib_import_string_read_error";
322DROP TABLE test_wl5522.t1;
323CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
324INSERT INTO test_wl5522.t1 VALUES (1);
325ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
326SELECT COUNT(*) FROM test_wl5522.t1;
327ERROR HY000: Tablespace has been discarded for table 't1'
328restore: t1 .ibd and .cfg files
329SET SESSION debug="+d,ib_import_OOM_1";
330ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
331ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
332SET SESSION debug="-d,ib_import_OOM_1";
333SET SESSION debug="+d,ib_import_OOM_2";
334ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
335ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
336SET SESSION debug="-d,ib_import_OOM_2";
337SET SESSION debug="+d,ib_import_OOM_4";
338ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
339ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
340SET SESSION debug="-d,ib_import_OOM_4";
341SET SESSION debug="+d,ib_import_OOM_5";
342ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
343ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
344SET SESSION debug="-d,ib_import_OOM_5";
345SET SESSION debug="+d,ib_import_OOM_6";
346ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
347ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
348SET SESSION debug="-d,ib_import_OOM_6";
349SET SESSION debug="+d,ib_import_OOM_7";
350ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
351ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
352SET SESSION debug="-d,ib_import_OOM_7";
353SET SESSION debug="+d,ib_import_OOM_8";
354ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
355ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
356SET SESSION debug="-d,ib_import_OOM_8";
357SET SESSION debug="+d,ib_import_OOM_9";
358ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
359ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
360SET SESSION debug="-d,ib_import_OOM_9";
361SET SESSION debug="+d,ib_import_OOM_10";
362ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
363ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
364SET SESSION debug="-d,ib_import_OOM_10";
365SET SESSION debug="+d,ib_import_OOM_15";
366ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
367ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space
368SET SESSION debug="-d,ib_import_OOM_15";
369DROP TABLE test_wl5522.t1;
370unlink: t1.ibd
371unlink: t1.cfg
372CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
373ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
374SELECT COUNT(*) FROM test_wl5522.t1;
375ERROR HY000: Tablespace has been discarded for table 't1'
376restore: t1 .ibd and .cfg files
377SET SESSION debug="+d,ib_import_internal_error";
378ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
379ERROR HY000: Internal error: While updating the <space, root page number> of index GEN_CLUST_INDEX - Generic error
380SET SESSION debug="-d,ib_import_internal_error";
381restore: t1 .ibd and .cfg files
382ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
383DROP TABLE test_wl5522.t1;
384CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
385ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
386SELECT COUNT(*) FROM test_wl5522.t1;
387ERROR HY000: Tablespace has been discarded for table 't1'
388restore: t1 .ibd and .cfg files
389SET SESSION debug="+d,ib_import_reset_space_and_lsn_failure";
390ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
391ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Too many concurrent transactions
392restore: t1 .ibd and .cfg files
393SET SESSION debug="-d,ib_import_reset_space_and_lsn_failure";
394SET SESSION debug="+d,ib_import_open_tablespace_failure";
395ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
396ERROR HY000: Can't find 't1.ibd' (errno: 44 - Tablespace not found)
397SET SESSION debug="-d,ib_import_open_tablespace_failure";
398restore: t1 .ibd and .cfg files
399SET SESSION debug="+d,ib_import_check_bitmap_failure";
400ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
401ERROR HY000: Incorrect key file for table 't1'; try to repair it
402SET SESSION debug="-d,ib_import_check_bitmap_failure";
403restore: t1 .ibd and .cfg files
404SET SESSION debug="+d,ib_import_cluster_root_adjust_failure";
405ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
406ERROR HY000: Incorrect key file for table 't1'; try to repair it
407SET SESSION debug="-d,ib_import_cluster_root_adjust_failure";
408restore: t1 .ibd and .cfg files
409SET SESSION debug="+d,ib_import_cluster_failure";
410ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
411ERROR HY000: Incorrect key file for table 't1'; try to repair it
412SET SESSION debug="-d,ib_import_cluster_failure";
413restore: t1 .ibd and .cfg files
414SET SESSION debug="+d,ib_import_sec_root_adjust_failure";
415ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
416ERROR HY000: Incorrect key file for table 't1'; try to repair it
417SET SESSION debug="-d,ib_import_sec_root_adjust_failure";
418restore: t1 .ibd and .cfg files
419SET SESSION debug="+d,ib_import_set_max_rowid_failure";
420ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
421ERROR HY000: Incorrect key file for table 't1'; try to repair it
422SET SESSION debug="-d,ib_import_set_max_rowid_failure";
423unlink: t1.ibd
424unlink: t1.cfg
425DROP TABLE test_wl5522.t1;
426CREATE TABLE test_wl5522.t1 (
427c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
428c2 BIGINT,
429c3 VARCHAR(2048),
430c4 VARCHAR(2048),
431INDEX idx1(c2),
432INDEX idx2(c3(512)),
433INDEX idx3(c4(512))) Engine=InnoDB;
434SET GLOBAL INNODB_PURGE_STOP_NOW=ON;
435SET GLOBAL innodb_disable_background_merge=ON;
436SET GLOBAL innodb_monitor_reset = ibuf_merges;
437SET GLOBAL innodb_monitor_reset = ibuf_merges_insert;
438INSERT INTO test_wl5522.t1(c2, c3, c4) VALUES
439(1, REPEAT('a', 2048), REPEAT('a', 2048)),
440(2, REPEAT('b', 2048), REPEAT('b', 2048)),
441(3, REPEAT('c', 2048), REPEAT('c', 2048)),
442(4, REPEAT('d', 2048), REPEAT('d', 2048));
443INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
444INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
445INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
446INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
447INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
448DELETE FROM test_wl5522.t1 WHERE c2 = 1;
449UPDATE test_wl5522.t1 SET c2 = c2 + c1;
450UPDATE test_wl5522.t1 SET c2 = c2 + c1;
451UPDATE test_wl5522.t1 SET c2 = c2 + c1;
452UPDATE test_wl5522.t1 SET c2 = c2 + c1;
453UPDATE test_wl5522.t1 SET c2 = c2 + c1;
454UPDATE test_wl5522.t1 SET c2 = c2 + c1;
455UPDATE test_wl5522.t1 SET c2 = c2 + c1;
456UPDATE test_wl5522.t1 SET c2 = c2 + c1;
457UPDATE test_wl5522.t1 SET c2 = c2 + c1;
458UPDATE test_wl5522.t1 SET c2 = c2 + c1;
459UPDATE test_wl5522.t1 SET c2 = c2 + c1;
460UPDATE test_wl5522.t1 SET c2 = c2 + c1;
461UPDATE test_wl5522.t1 SET c2 = c2 + c1;
462UPDATE test_wl5522.t1 SET c2 = c2 + c1;
463UPDATE test_wl5522.t1 SET c2 = c2 + c1;
464UPDATE test_wl5522.t1 SET c3 = REPEAT("c2", 1024);
465UPDATE test_wl5522.t1 SET c4 = REPEAT("c4", 1024);
466SHOW CREATE TABLE test_wl5522.t1;
467Table	Create Table
468t1	CREATE TABLE `t1` (
469  `c1` bigint(20) NOT NULL AUTO_INCREMENT,
470  `c2` bigint(20) DEFAULT NULL,
471  `c3` varchar(2048) DEFAULT NULL,
472  `c4` varchar(2048) DEFAULT NULL,
473  PRIMARY KEY (`c1`),
474  KEY `idx1` (`c2`),
475  KEY `idx2` (`c3`(512)),
476  KEY `idx3` (`c4`(512))
477) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1
478SELECT c1, c2 FROM test_wl5522.t1;
479c1	c2
4802	32
4813	48
4824	64
4836	92
4847	108
4858	124
48613	197
48714	213
48815	229
48917	257
49018	273
49119	289
49228	422
49329	438
49430	454
49532	482
49633	498
49734	514
49836	542
49937	558
50038	574
50140	602
50241	618
50342	634
50459	887
50560	903
50661	919
50763	947
50864	963
50965	979
51067	1007
51168	1023
51269	1039
51371	1067
51472	1083
51573	1099
51675	1127
51776	1143
51877	1159
51979	1187
52080	1203
52181	1219
52283	1247
52384	1263
52485	1279
52587	1307
52688	1323
52789	1339
528122	1832
529123	1848
530124	1864
531126	1892
532127	1908
533128	1924
534130	1952
535131	1968
536132	1984
537134	2012
538135	2028
539136	2044
540138	2072
541139	2088
542140	2104
543142	2132
544143	2148
545144	2164
546146	2192
547147	2208
548148	2224
549150	2252
550151	2268
551152	2284
552154	2312
553155	2328
554156	2344
555158	2372
556159	2388
557160	2404
558162	2432
559163	2448
560164	2464
561166	2492
562167	2508
563168	2524
564170	2552
565171	2568
566172	2584
567174	2612
568175	2628
569176	2644
570178	2672
571179	2688
572180	2704
573182	2732
574183	2748
575184	2764
576SELECT COUNT(*) FROM test_wl5522.t1;
577COUNT(*)
57896
579SELECT SUM(c2) FROM test_wl5522.t1;
580SUM(c2)
581145278
582SELECT name
583FROM information_schema.innodb_metrics
584WHERE name = 'ibuf_merges_insert' AND count = 0;
585name
586FLUSH TABLES test_wl5522.t1 FOR EXPORT;
587backup: t1
588UNLOCK TABLES;
589SELECT name
590FROM information_schema.innodb_metrics
591WHERE name = 'ibuf_merges' AND count > 0;
592name
593ibuf_merges
594SELECT name
595FROM information_schema.innodb_metrics
596WHERE name = 'ibuf_merges_inserts' AND count > 0;
597name
598SET GLOBAL innodb_disable_background_merge=OFF;
599SET GLOBAL INNODB_PURGE_RUN_NOW=ON;
600DROP TABLE test_wl5522.t1;
601CREATE TABLE test_wl5522.t1 (
602c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
603c2 BIGINT,
604c3 VARCHAR(2048),
605c4 VARCHAR(2048),
606INDEX idx1(c2),
607INDEX idx2(c3(512)),
608INDEX idx3(c4(512))) Engine=InnoDB;
609SELECT c1, c2 FROM test_wl5522.t1;
610c1	c2
611ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
612restore: t1 .ibd and .cfg files
613ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
614CHECK TABLE test_wl5522.t1;
615Table	Op	Msg_type	Msg_text
616test_wl5522.t1	check	status	OK
617SELECT c1,c2 FROM test_wl5522.t1;
618c1	c2
6192	32
6203	48
6214	64
6226	92
6237	108
6248	124
62513	197
62614	213
62715	229
62817	257
62918	273
63019	289
63128	422
63229	438
63330	454
63432	482
63533	498
63634	514
63736	542
63837	558
63938	574
64040	602
64141	618
64242	634
64359	887
64460	903
64561	919
64663	947
64764	963
64865	979
64967	1007
65068	1023
65169	1039
65271	1067
65372	1083
65473	1099
65575	1127
65676	1143
65777	1159
65879	1187
65980	1203
66081	1219
66183	1247
66284	1263
66385	1279
66487	1307
66588	1323
66689	1339
667122	1832
668123	1848
669124	1864
670126	1892
671127	1908
672128	1924
673130	1952
674131	1968
675132	1984
676134	2012
677135	2028
678136	2044
679138	2072
680139	2088
681140	2104
682142	2132
683143	2148
684144	2164
685146	2192
686147	2208
687148	2224
688150	2252
689151	2268
690152	2284
691154	2312
692155	2328
693156	2344
694158	2372
695159	2388
696160	2404
697162	2432
698163	2448
699164	2464
700166	2492
701167	2508
702168	2524
703170	2552
704171	2568
705172	2584
706174	2612
707175	2628
708176	2644
709178	2672
710179	2688
711180	2704
712182	2732
713183	2748
714184	2764
715SELECT COUNT(*) FROM test_wl5522.t1;
716COUNT(*)
71796
718SELECT SUM(c2) FROM test_wl5522.t1;
719SUM(c2)
720145278
721SHOW CREATE TABLE test_wl5522.t1;
722Table	Create Table
723t1	CREATE TABLE `t1` (
724  `c1` bigint(20) NOT NULL AUTO_INCREMENT,
725  `c2` bigint(20) DEFAULT NULL,
726  `c3` varchar(2048) DEFAULT NULL,
727  `c4` varchar(2048) DEFAULT NULL,
728  PRIMARY KEY (`c1`),
729  KEY `idx1` (`c2`),
730  KEY `idx2` (`c3`(512)),
731  KEY `idx3` (`c4`(512))
732) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1
733DROP TABLE test_wl5522.t1;
734CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
735INSERT IGNORE INTO test_wl5522.t1 VALUES
736(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 4800));
737Warnings:
738Warning	1265	Data truncated for column 'c2' at row 1
739INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
740INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
741INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
742INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
743INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
744INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
745INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
746INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
747SELECT COUNT(*) FROM test_wl5522.t1;
748COUNT(*)
749256
750FLUSH TABLES test_wl5522.t1 FOR EXPORT;
751backup: t1
752UNLOCK TABLES;
753DROP TABLE test_wl5522.t1;
754CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
755ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
756SELECT COUNT(*) FROM test_wl5522.t1;
757ERROR HY000: Tablespace has been discarded for table 't1'
758restore: t1 .ibd and .cfg files
759SET SESSION debug="+d,ib_import_trigger_corruption_1";
760ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
761ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Data structure corruption
762SET SESSION debug="-d,ib_import_trigger_corruption_1";
763DROP TABLE test_wl5522.t1;
764unlink: t1.ibd
765unlink: t1.cfg
766CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
767ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
768SELECT COUNT(*) FROM test_wl5522.t1;
769ERROR HY000: Tablespace has been discarded for table 't1'
770restore: t1 .ibd and .cfg files
771SET SESSION debug="+d,buf_page_import_corrupt_failure";
772ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
773ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Data structure corruption
774SET SESSION debug="-d,buf_page_import_corrupt_failure";
775DROP TABLE test_wl5522.t1;
776unlink: t1.ibd
777unlink: t1.cfg
778CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
779ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
780SELECT COUNT(*) FROM test_wl5522.t1;
781ERROR HY000: Tablespace has been discarded for table 't1'
782restore: t1 .ibd and .cfg files
783SET SESSION debug="+d,ib_import_trigger_corruption_2";
784ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
785ERROR HY000: Index corrupt: Externally stored column(5) has a reference length of 19 in the cluster index GEN_CLUST_INDEX
786SET SESSION debug="-d,ib_import_trigger_corruption_2";
787DROP TABLE test_wl5522.t1;
788unlink: t1.ibd
789unlink: t1.cfg
790CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
791ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
792SELECT COUNT(*) FROM test_wl5522.t1;
793ERROR HY000: Tablespace has been discarded for table 't1'
794restore: t1 .ibd and .cfg files
795SET SESSION debug="+d,ib_import_trigger_corruption_3";
796ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
797ERROR HY000: Incorrect key file for table 't1'; try to repair it
798SET SESSION debug="-d,ib_import_trigger_corruption_3";
799DROP TABLE test_wl5522.t1;
800unlink: t1.ibd
801unlink: t1.cfg
802CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
803ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
804SELECT COUNT(*) FROM test_wl5522.t1;
805ERROR HY000: Tablespace has been discarded for table 't1'
806SET SESSION debug="+d,ib_import_create_index_failure_1";
807ALTER TABLE test_wl5522.t1 ADD INDEX idx(c1);
808Warnings:
809Warning	1814	InnoDB: Tablespace has been discarded for table 't1'
810SET SESSION debug="-d,ib_import_create_index_failure_1";
811DROP TABLE test_wl5522.t1;
812unlink: t1.ibd
813unlink: t1.cfg
814CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
815ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
816SELECT COUNT(*) FROM test_wl5522.t1;
817ERROR HY000: Tablespace has been discarded for table 't1'
818restore: t1 .ibd and .cfg files
819SET SESSION debug="+d,fil_space_create_failure";
820ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
821ERROR HY000: Can't find file: './test_wl5522/t1.ibd' (errno: 11 - Generic error)
822SET SESSION debug="-d,fil_space_create_failure";
823DROP TABLE test_wl5522.t1;
824unlink: t1.ibd
825unlink: t1.cfg
826CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
827ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
828SELECT COUNT(*) FROM test_wl5522.t1;
829ERROR HY000: Tablespace has been discarded for table 't1'
830restore: t1 .ibd and .cfg files
831SET SESSION debug="+d,dict_tf_to_fsp_flags_failure";
832ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
833ERROR HY000: Can't find file: './test_wl5522/t1.ibd' (errno: 39 - Data structure corruption)
834SET SESSION debug="-d,dict_tf_to_fsp_flags_failure";
835DROP TABLE test_wl5522.t1;
836unlink: t1.ibd
837unlink: t1.cfg
838CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
839ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
840SELECT COUNT(*) FROM test_wl5522.t1;
841ERROR HY000: Tablespace has been discarded for table 't1'
842restore: t1 .ibd and .cfg files
843SET SESSION debug="+d,fsp_flags_is_valid_failure";
844ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
845ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Unsupported
846SET SESSION debug="-d,fsp_flags_is_valid_failure";
847DROP TABLE test_wl5522.t1;
848unlink: t1.ibd
849unlink: t1.cfg
850DROP DATABASE test_wl5522;
851set global innodb_monitor_disable = all;
852set global innodb_monitor_reset_all = all;
853set global innodb_monitor_enable = default;
854set global innodb_monitor_disable = default;
855set global innodb_monitor_reset = default;
856set global innodb_monitor_reset_all = default;
857SET GLOBAL INNODB_FILE_PER_TABLE=1;
858count_alloc WHERE event_name like 'memory/innodb/other'
859count_alloc
8600
861