1call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation."); 2call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified."); 3call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them."); 4call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*"); 5call mtr.add_suppression("InnoDB: Ignoring tablespace .* because it could not be opened."); 6call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); 7call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .*"); 8call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file"); 9call mtr.add_suppression("InnoDB: Page for tablespace "); 10call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS="); 11call mtr.add_suppression("InnoDB: Unknown index id .* on page"); 12FLUSH TABLES; 13SET GLOBAL innodb_file_per_table = 1; 14CREATE TABLE t1 (c1 INT) ENGINE = InnoDB; 15INSERT INTO t1 VALUES(1),(2),(3); 16SET SESSION debug_dbug="+d,ib_discard_before_commit_crash"; 17ALTER TABLE t1 DISCARD TABLESPACE; 18ERROR HY000: Lost connection to MySQL server during query 19DROP TABLE t1; 20SET GLOBAL innodb_file_per_table = 1; 21CREATE TABLE t1 (c1 INT) ENGINE = InnoDB; 22INSERT INTO t1 VALUES(1),(2),(3); 23SET SESSION debug_dbug="+d,ib_discard_after_commit_crash"; 24ALTER TABLE t1 DISCARD TABLESPACE; 25ERROR HY000: Lost connection to MySQL server during query 26DROP TABLE t1; 27SET GLOBAL innodb_file_per_table = 1; 28CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 29INSERT INTO t1 VALUES (1), (2), (3), (4); 30FLUSH TABLES t1 FOR EXPORT; 31backup: t1 32UNLOCK TABLES; 33DROP TABLE t1; 34CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 35INSERT INTO t1 VALUES (1); 36ALTER TABLE t1 DISCARD TABLESPACE; 37SELECT COUNT(*) FROM t1; 38ERROR HY000: Tablespace has been discarded for table `t1` 39restore: t1 .ibd and .cfg files 40SELECT * FROM t1; 41ERROR HY000: Tablespace has been discarded for table `t1` 42SET SESSION debug_dbug="+d,ib_import_before_commit_crash"; 43ALTER TABLE t1 IMPORT TABLESPACE; 44ERROR HY000: Lost connection to MySQL server during query 45SELECT COUNT(*) FROM t1; 46ERROR HY000: Tablespace has been discarded for table `t1` 47SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash"; 48ALTER TABLE t1 IMPORT TABLESPACE; 49ERROR HY000: Lost connection to MySQL server during query 50unlink: t1.ibd 51unlink: t1.cfg 52DROP TABLE t1; 53SET @file_per_table= @@innodb_file_per_table; 54SET GLOBAL innodb_file_per_table = 1; 55CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 56ALTER TABLE t1 DISCARD TABLESPACE; 57restore: t1 .ibd and .cfg files 58ALTER TABLE t1 IMPORT TABLESPACE; 59CHECK TABLE t1; 60Table Op Msg_type Msg_text 61test.t1 check status OK 62SELECT COUNT(*) FROM t1; 63COUNT(*) 644 65INSERT INTO t1 VALUES(400), (500), (600); 66SELECT * FROM t1; 67c1 681 692 703 714 72400 73500 74600 75DROP TABLE t1; 76CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 77INSERT INTO t1 VALUES (1); 78SET @saved_debug_dbug = @@SESSION.debug_dbug; 79SET SESSION debug_dbug="+d,ib_export_io_write_failure_1"; 80FLUSH TABLES t1 FOR EXPORT; 81Warnings: 82Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed 83Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed 84UNLOCK TABLES; 85SET SESSION debug_dbug=@saved_debug_dbug; 86DROP TABLE t1; 87CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 88INSERT INTO t1 VALUES (1); 89SET SESSION debug_dbug="+d,ib_export_io_write_failure_2"; 90FLUSH TABLES t1 FOR EXPORT; 91Warnings: 92Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed 93Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed 94UNLOCK TABLES; 95SET SESSION debug_dbug=@saved_debug_dbug; 96DROP TABLE t1; 97CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 98INSERT INTO t1 VALUES (1); 99SET SESSION debug_dbug="+d,ib_export_io_write_failure_3"; 100FLUSH TABLES t1 FOR EXPORT; 101Warnings: 102Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed 103Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed 104UNLOCK TABLES; 105SET SESSION debug_dbug=@saved_debug_dbug; 106DROP TABLE t1; 107CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 108INSERT INTO t1 VALUES (1); 109SET SESSION debug_dbug="+d,ib_export_io_write_failure_4"; 110FLUSH TABLES t1 FOR EXPORT; 111Warnings: 112Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed 113Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed 114UNLOCK TABLES; 115SET SESSION debug_dbug=@saved_debug_dbug; 116DROP TABLE t1; 117CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 118INSERT INTO t1 VALUES (1); 119SET SESSION debug_dbug="+d,ib_export_io_write_failure_5"; 120FLUSH TABLES t1 FOR EXPORT; 121Warnings: 122Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed 123Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed 124UNLOCK TABLES; 125SET SESSION debug_dbug=@saved_debug_dbug; 126DROP TABLE t1; 127CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 128INSERT INTO t1 VALUES (1); 129SET SESSION debug_dbug="+d,ib_export_io_write_failure_6"; 130FLUSH TABLES t1 FOR EXPORT; 131Warnings: 132Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed 133Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed 134UNLOCK TABLES; 135SET SESSION debug_dbug=@saved_debug_dbug; 136DROP TABLE t1; 137CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 138INSERT INTO t1 VALUES (1); 139SET SESSION debug_dbug="+d,ib_export_io_write_failure_7"; 140FLUSH TABLES t1 FOR EXPORT; 141Warnings: 142Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed 143Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed 144UNLOCK TABLES; 145SET SESSION debug_dbug=@saved_debug_dbug; 146DROP TABLE t1; 147CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 148INSERT INTO t1 VALUES (1); 149SET SESSION debug_dbug="+d,ib_export_io_write_failure_8"; 150FLUSH TABLES t1 FOR EXPORT; 151Warnings: 152Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed 153Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed 154UNLOCK TABLES; 155SET SESSION debug_dbug=@saved_debug_dbug; 156DROP TABLE t1; 157CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 158INSERT INTO t1 VALUES (1); 159SET SESSION debug_dbug="+d,ib_export_io_write_failure_9"; 160FLUSH TABLES t1 FOR EXPORT; 161Warnings: 162Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed 163Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed 164UNLOCK TABLES; 165SET SESSION debug_dbug=@saved_debug_dbug; 166DROP TABLE t1; 167CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 168INSERT INTO t1 VALUES (1); 169SET SESSION debug_dbug="+d,ib_export_io_write_failure_10"; 170FLUSH TABLES t1 FOR EXPORT; 171Warnings: 172Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed 173Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed 174UNLOCK TABLES; 175SET SESSION debug_dbug=@saved_debug_dbug; 176DROP TABLE t1; 177CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 178INSERT INTO t1 VALUES (1); 179SET SESSION debug_dbug="+d,ib_export_io_write_failure_11"; 180FLUSH TABLES t1 FOR EXPORT; 181Warnings: 182Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed 183Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed 184UNLOCK TABLES; 185SET SESSION debug_dbug=@saved_debug_dbug; 186DROP TABLE t1; 187CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 188INSERT INTO t1 VALUES (1); 189SET SESSION debug_dbug="+d,ib_export_io_write_failure_12"; 190FLUSH TABLES t1 FOR EXPORT; 191Warnings: 192Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed 193Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed 194UNLOCK TABLES; 195SET SESSION debug_dbug=@saved_debug_dbug; 196DROP TABLE t1; 197CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 198INSERT INTO t1 VALUES (100), (200), (300); 199SELECT COUNT(*) FROM t1; 200COUNT(*) 2013 202FLUSH TABLES t1 FOR EXPORT; 203backup: t1 204UNLOCK TABLES; 205DROP TABLE t1; 206CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 207INSERT INTO t1 VALUES (1); 208ALTER TABLE t1 DISCARD TABLESPACE; 209SELECT COUNT(*) FROM t1; 210ERROR HY000: Tablespace has been discarded for table `t1` 211SET SESSION debug_dbug="+d,ib_import_io_read_error_1"; 212restore: t1 .cfg file 213ALTER TABLE t1 IMPORT TABLESPACE; 214ERROR HY000: IO Read error: while reading index fields. 215SET SESSION debug_dbug=@saved_debug_dbug; 216DROP TABLE t1; 217CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 218INSERT INTO t1 VALUES (1); 219ALTER TABLE t1 DISCARD TABLESPACE; 220SELECT COUNT(*) FROM t1; 221ERROR HY000: Tablespace has been discarded for table `t1` 222SET SESSION debug_dbug="+d,ib_import_io_read_error_2"; 223restore: t1 .cfg file 224ALTER TABLE t1 IMPORT TABLESPACE; 225ERROR HY000: IO Read error: while reading index meta-data, expected to read 44 bytes but read only 0 bytes 226SET SESSION debug_dbug=@saved_debug_dbug; 227DROP TABLE t1; 228CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 229INSERT INTO t1 VALUES (1); 230ALTER TABLE t1 DISCARD TABLESPACE; 231SELECT COUNT(*) FROM t1; 232ERROR HY000: Tablespace has been discarded for table `t1` 233SET SESSION debug_dbug="+d,ib_import_io_read_error_3"; 234restore: t1 .cfg file 235ALTER TABLE t1 IMPORT TABLESPACE; 236ERROR HY000: IO Read error: while reading number of indexes. 237SET SESSION debug_dbug=@saved_debug_dbug; 238DROP TABLE t1; 239CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 240INSERT INTO t1 VALUES (1); 241ALTER TABLE t1 DISCARD TABLESPACE; 242SELECT COUNT(*) FROM t1; 243ERROR HY000: Tablespace has been discarded for table `t1` 244SET SESSION debug_dbug="+d,ib_import_io_read_error_4"; 245restore: t1 .cfg file 246ALTER TABLE t1 IMPORT TABLESPACE; 247ERROR HY000: IO Read error: while reading table column meta-data. 248SET SESSION debug_dbug=@saved_debug_dbug; 249DROP TABLE t1; 250CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 251INSERT INTO t1 VALUES (1); 252ALTER TABLE t1 DISCARD TABLESPACE; 253SELECT COUNT(*) FROM t1; 254ERROR HY000: Tablespace has been discarded for table `t1` 255SET SESSION debug_dbug="+d,ib_import_io_read_error_5"; 256restore: t1 .cfg file 257ALTER TABLE t1 IMPORT TABLESPACE; 258ERROR HY000: IO Read error: while reading meta-data export hostname length. 259SET SESSION debug_dbug=@saved_debug_dbug; 260DROP TABLE t1; 261CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 262INSERT INTO t1 VALUES (1); 263ALTER TABLE t1 DISCARD TABLESPACE; 264SELECT COUNT(*) FROM t1; 265ERROR HY000: Tablespace has been discarded for table `t1` 266SET SESSION debug_dbug="+d,ib_import_io_read_error_6"; 267restore: t1 .cfg file 268ALTER TABLE t1 IMPORT TABLESPACE; 269ERROR HY000: IO Read error: while reading meta-data table name length. 270SET SESSION debug_dbug=@saved_debug_dbug; 271DROP TABLE t1; 272CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 273INSERT INTO t1 VALUES (1); 274ALTER TABLE t1 DISCARD TABLESPACE; 275SELECT COUNT(*) FROM t1; 276ERROR HY000: Tablespace has been discarded for table `t1` 277SET SESSION debug_dbug="+d,ib_import_io_read_error_7"; 278restore: t1 .cfg file 279ALTER TABLE t1 IMPORT TABLESPACE; 280ERROR HY000: IO Read error: while reading autoinc value. 281SET SESSION debug_dbug=@saved_debug_dbug; 282DROP TABLE t1; 283CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 284INSERT INTO t1 VALUES (1); 285ALTER TABLE t1 DISCARD TABLESPACE; 286SELECT COUNT(*) FROM t1; 287ERROR HY000: Tablespace has been discarded for table `t1` 288SET SESSION debug_dbug="+d,ib_import_io_read_error_8"; 289restore: t1 .cfg file 290ALTER TABLE t1 IMPORT TABLESPACE; 291ERROR HY000: IO Read error: while reading meta-data header. 292SET SESSION debug_dbug=@saved_debug_dbug; 293DROP TABLE t1; 294CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 295INSERT INTO t1 VALUES (1); 296ALTER TABLE t1 DISCARD TABLESPACE; 297SELECT COUNT(*) FROM t1; 298ERROR HY000: Tablespace has been discarded for table `t1` 299SET SESSION debug_dbug="+d,ib_import_io_read_error_9"; 300restore: t1 .cfg file 301ALTER TABLE t1 IMPORT TABLESPACE; 302ERROR HY000: IO Read error: while reading meta-data version. 303SET SESSION debug_dbug=@saved_debug_dbug; 304DROP TABLE t1; 305CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 306INSERT INTO t1 VALUES (1); 307ALTER TABLE t1 DISCARD TABLESPACE; 308SELECT COUNT(*) FROM t1; 309ERROR HY000: Tablespace has been discarded for table `t1` 310SET SESSION debug_dbug="+d,ib_import_string_read_error"; 311restore: t1 .cfg file 312ALTER TABLE t1 IMPORT TABLESPACE; 313ERROR HY000: IO Read error: while parsing export hostname. 314SET SESSION debug_dbug=@saved_debug_dbug; 315DROP TABLE t1; 316CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 317INSERT INTO t1 VALUES (1); 318ALTER TABLE t1 DISCARD TABLESPACE; 319SELECT COUNT(*) FROM t1; 320ERROR HY000: Tablespace has been discarded for table `t1` 321restore: t1 .ibd and .cfg files 322SET SESSION debug_dbug="+d,ib_import_OOM_1"; 323ALTER TABLE t1 IMPORT TABLESPACE; 324ERROR HY000: Out of memory. 325SET SESSION debug_dbug=@saved_debug_dbug; 326DROP TABLE t1; 327unlink: t1.ibd 328unlink: t1.cfg 329CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 330INSERT INTO t1 VALUES (1); 331ALTER TABLE t1 DISCARD TABLESPACE; 332SELECT COUNT(*) FROM t1; 333ERROR HY000: Tablespace has been discarded for table `t1` 334restore: t1 .ibd and .cfg files 335SET SESSION debug_dbug="+d,ib_import_OOM_2"; 336ALTER TABLE t1 IMPORT TABLESPACE; 337ERROR HY000: Out of memory. 338SET SESSION debug_dbug=@saved_debug_dbug; 339DROP TABLE t1; 340unlink: t1.ibd 341unlink: t1.cfg 342CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 343INSERT INTO t1 VALUES (1); 344ALTER TABLE t1 DISCARD TABLESPACE; 345SELECT COUNT(*) FROM t1; 346ERROR HY000: Tablespace has been discarded for table `t1` 347restore: t1 .ibd and .cfg files 348SET SESSION debug_dbug="+d,ib_import_OOM_4"; 349ALTER TABLE t1 IMPORT TABLESPACE; 350ERROR HY000: Out of memory. 351SET SESSION debug_dbug=@saved_debug_dbug; 352DROP TABLE t1; 353unlink: t1.ibd 354unlink: t1.cfg 355CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 356INSERT INTO t1 VALUES (1); 357ALTER TABLE t1 DISCARD TABLESPACE; 358SELECT COUNT(*) FROM t1; 359ERROR HY000: Tablespace has been discarded for table `t1` 360restore: t1 .ibd and .cfg files 361SET SESSION debug_dbug="+d,ib_import_OOM_5"; 362ALTER TABLE t1 IMPORT TABLESPACE; 363ERROR HY000: Out of memory. 364SET SESSION debug_dbug=@saved_debug_dbug; 365DROP TABLE t1; 366unlink: t1.ibd 367unlink: t1.cfg 368CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 369INSERT INTO t1 VALUES (1); 370ALTER TABLE t1 DISCARD TABLESPACE; 371SELECT COUNT(*) FROM t1; 372ERROR HY000: Tablespace has been discarded for table `t1` 373restore: t1 .ibd and .cfg files 374SET SESSION debug_dbug="+d,ib_import_OOM_6"; 375ALTER TABLE t1 IMPORT TABLESPACE; 376ERROR HY000: Out of memory. 377SET SESSION debug_dbug=@saved_debug_dbug; 378DROP TABLE t1; 379unlink: t1.ibd 380unlink: t1.cfg 381CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 382INSERT INTO t1 VALUES (1); 383ALTER TABLE t1 DISCARD TABLESPACE; 384SELECT COUNT(*) FROM t1; 385ERROR HY000: Tablespace has been discarded for table `t1` 386restore: t1 .ibd and .cfg files 387SET SESSION debug_dbug="+d,ib_import_OOM_7"; 388ALTER TABLE t1 IMPORT TABLESPACE; 389ERROR HY000: Out of memory. 390SET SESSION debug_dbug=@saved_debug_dbug; 391DROP TABLE t1; 392unlink: t1.ibd 393unlink: t1.cfg 394CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 395INSERT INTO t1 VALUES (1); 396ALTER TABLE t1 DISCARD TABLESPACE; 397SELECT COUNT(*) FROM t1; 398ERROR HY000: Tablespace has been discarded for table `t1` 399restore: t1 .ibd and .cfg files 400SET SESSION debug_dbug="+d,ib_import_OOM_8"; 401ALTER TABLE t1 IMPORT TABLESPACE; 402ERROR HY000: Out of memory. 403SET SESSION debug_dbug=@saved_debug_dbug; 404DROP TABLE t1; 405unlink: t1.ibd 406unlink: t1.cfg 407CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 408INSERT INTO t1 VALUES (1); 409ALTER TABLE t1 DISCARD TABLESPACE; 410SELECT COUNT(*) FROM t1; 411ERROR HY000: Tablespace has been discarded for table `t1` 412restore: t1 .ibd and .cfg files 413SET SESSION debug_dbug="+d,ib_import_OOM_9"; 414ALTER TABLE t1 IMPORT TABLESPACE; 415ERROR HY000: Out of memory. 416SET SESSION debug_dbug=@saved_debug_dbug; 417DROP TABLE t1; 418unlink: t1.ibd 419unlink: t1.cfg 420CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 421INSERT INTO t1 VALUES (1); 422ALTER TABLE t1 DISCARD TABLESPACE; 423SELECT COUNT(*) FROM t1; 424ERROR HY000: Tablespace has been discarded for table `t1` 425restore: t1 .ibd and .cfg files 426SET SESSION debug_dbug="+d,ib_import_OOM_10"; 427ALTER TABLE t1 IMPORT TABLESPACE; 428ERROR HY000: Out of memory. 429SET SESSION debug_dbug=@saved_debug_dbug; 430DROP TABLE t1; 431unlink: t1.ibd 432unlink: t1.cfg 433CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 434ALTER TABLE t1 DISCARD TABLESPACE; 435SELECT COUNT(*) FROM t1; 436ERROR HY000: Tablespace has been discarded for table `t1` 437restore: t1 .ibd and .cfg files 438SET SESSION debug_dbug="+d,ib_import_internal_error"; 439ALTER TABLE t1 IMPORT TABLESPACE; 440ERROR HY000: Internal error: While updating the <space, root page number> of index GEN_CLUST_INDEX - Generic error 441SET SESSION debug_dbug=@saved_debug_dbug; 442restore: t1 .ibd and .cfg files 443ALTER TABLE t1 IMPORT TABLESPACE; 444DROP TABLE t1; 445CREATE TABLE t1 (c1 INT) ENGINE = Innodb; 446ALTER TABLE t1 DISCARD TABLESPACE; 447SELECT COUNT(*) FROM t1; 448ERROR HY000: Tablespace has been discarded for table `t1` 449restore: t1 .ibd and .cfg files 450SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure"; 451ALTER TABLE t1 IMPORT TABLESPACE; 452ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Too many concurrent transactions 453restore: t1 .ibd and .cfg files 454SET SESSION debug_dbug=@saved_debug_dbug; 455SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; 456ALTER TABLE t1 IMPORT TABLESPACE; 457ERROR HY000: Got error 44 'Tablespace not found' from ./test/t1.ibd 458SET SESSION debug_dbug=@saved_debug_dbug; 459restore: t1 .ibd and .cfg files 460SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure"; 461ALTER TABLE t1 IMPORT TABLESPACE; 462ERROR HY000: Index for table 't1' is corrupt; try to repair it 463SET SESSION debug_dbug=@saved_debug_dbug; 464restore: t1 .ibd and .cfg files 465SET SESSION debug_dbug="+d,ib_import_cluster_root_adjust_failure"; 466ALTER TABLE t1 IMPORT TABLESPACE; 467ERROR HY000: Index for table 't1' is corrupt; try to repair it 468SET SESSION debug_dbug=@saved_debug_dbug; 469restore: t1 .ibd and .cfg files 470SET SESSION debug_dbug="+d,ib_import_cluster_failure"; 471ALTER TABLE t1 IMPORT TABLESPACE; 472ERROR HY000: Index for table 't1' is corrupt; try to repair it 473SET SESSION debug_dbug=@saved_debug_dbug; 474restore: t1 .ibd and .cfg files 475SET SESSION debug_dbug="+d,ib_import_sec_root_adjust_failure"; 476ALTER TABLE t1 IMPORT TABLESPACE; 477ERROR HY000: Index for table 't1' is corrupt; try to repair it 478SET SESSION debug_dbug=@saved_debug_dbug; 479restore: t1 .ibd and .cfg files 480DROP TABLE t1; 481CREATE TABLE t1 ( 482c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, 483c2 BIGINT, 484c3 VARCHAR(2048), 485c4 VARCHAR(2048), 486INDEX idx1(c2), 487INDEX idx2(c3(512)), 488INDEX idx3(c4(512))) Engine=InnoDB; 489connect purge_control,localhost,root; 490START TRANSACTION WITH CONSISTENT SNAPSHOT; 491connection default; 492INSERT INTO t1 493SELECT 1 + seq, 1 + (seq MOD 4), 494REPEAT(SUBSTR('abcd', 1 + (seq MOD 4), 1), 2048), 495REPEAT(SUBSTR('abcd', 1 + (seq MOD 4), 1), 2048) 496FROM seq_0_to_127; 497UPDATE t1 SET c2 = c2 + c1; 498UPDATE t1 SET c2 = c2 + c1; 499UPDATE t1 SET c2 = c2 + c1; 500UPDATE t1 SET c2 = c2 + c1; 501UPDATE t1 SET c2 = c2 + c1; 502UPDATE t1 SET c2 = c2 + c1; 503UPDATE t1 SET c2 = c2 + c1; 504UPDATE t1 SET c2 = c2 + c1; 505UPDATE t1 SET c2 = c2 + c1; 506UPDATE t1 SET c2 = c2 + c1; 507UPDATE t1 SET c2 = c2 + c1; 508UPDATE t1 SET c2 = c2 + c1; 509UPDATE t1 SET c2 = c2 + c1; 510UPDATE t1 SET c2 = c2 + c1; 511UPDATE t1 SET c2 = c2 + c1; 512UPDATE t1 SET c3 = REPEAT("c2", 1024); 513UPDATE t1 SET c4 = REPEAT("c4", 1024); 514SHOW CREATE TABLE t1; 515Table Create Table 516t1 CREATE TABLE `t1` ( 517 `c1` bigint(20) NOT NULL AUTO_INCREMENT, 518 `c2` bigint(20) DEFAULT NULL, 519 `c3` varchar(2048) DEFAULT NULL, 520 `c4` varchar(2048) DEFAULT NULL, 521 PRIMARY KEY (`c1`), 522 KEY `idx1` (`c2`), 523 KEY `idx2` (`c3`(512)), 524 KEY `idx3` (`c4`(512)) 525) ENGINE=InnoDB AUTO_INCREMENT=129 DEFAULT CHARSET=latin1 526SELECT c1, c2 FROM t1; 527c1 c2 5281 16 5292 32 5303 48 5314 64 5325 76 5336 92 5347 108 5358 124 5369 136 53710 152 53811 168 53912 184 54013 196 54114 212 54215 228 54316 244 54417 256 54518 272 54619 288 54720 304 54821 316 54922 332 55023 348 55124 364 55225 376 55326 392 55427 408 55528 424 55629 436 55730 452 55831 468 55932 484 56033 496 56134 512 56235 528 56336 544 56437 556 56538 572 56639 588 56740 604 56841 616 56942 632 57043 648 57144 664 57245 676 57346 692 57447 708 57548 724 57649 736 57750 752 57851 768 57952 784 58053 796 58154 812 58255 828 58356 844 58457 856 58558 872 58659 888 58760 904 58861 916 58962 932 59063 948 59164 964 59265 976 59366 992 59467 1008 59568 1024 59669 1036 59770 1052 59871 1068 59972 1084 60073 1096 60174 1112 60275 1128 60376 1144 60477 1156 60578 1172 60679 1188 60780 1204 60881 1216 60982 1232 61083 1248 61184 1264 61285 1276 61386 1292 61487 1308 61588 1324 61689 1336 61790 1352 61891 1368 61992 1384 62093 1396 62194 1412 62295 1428 62396 1444 62497 1456 62598 1472 62699 1488 627100 1504 628101 1516 629102 1532 630103 1548 631104 1564 632105 1576 633106 1592 634107 1608 635108 1624 636109 1636 637110 1652 638111 1668 639112 1684 640113 1696 641114 1712 642115 1728 643116 1744 644117 1756 645118 1772 646119 1788 647120 1804 648121 1816 649122 1832 650123 1848 651124 1864 652125 1876 653126 1892 654127 1908 655128 1924 656SELECT COUNT(*) FROM t1; 657COUNT(*) 658128 659SELECT SUM(c2) FROM t1; 660SUM(c2) 661124160 662FLUSH TABLES t1 FOR EXPORT; 663backup: t1 664UNLOCK TABLES; 665connection purge_control; 666COMMIT; 667disconnect purge_control; 668connection default; 669DROP TABLE t1; 670CREATE TABLE t1 ( 671c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, 672c2 BIGINT, 673c3 VARCHAR(2048), 674c4 VARCHAR(2048), 675INDEX idx1(c2), 676INDEX idx2(c3(512)), 677INDEX idx3(c4(512))) Engine=InnoDB; 678SELECT c1, c2 FROM t1; 679c1 c2 680ALTER TABLE t1 DISCARD TABLESPACE; 681restore: t1 .ibd and .cfg files 682ALTER TABLE t1 IMPORT TABLESPACE; 683CHECK TABLE t1; 684Table Op Msg_type Msg_text 685test.t1 check status OK 686SELECT c1,c2 FROM t1; 687c1 c2 6881 16 6892 32 6903 48 6914 64 6925 76 6936 92 6947 108 6958 124 6969 136 69710 152 69811 168 69912 184 70013 196 70114 212 70215 228 70316 244 70417 256 70518 272 70619 288 70720 304 70821 316 70922 332 71023 348 71124 364 71225 376 71326 392 71427 408 71528 424 71629 436 71730 452 71831 468 71932 484 72033 496 72134 512 72235 528 72336 544 72437 556 72538 572 72639 588 72740 604 72841 616 72942 632 73043 648 73144 664 73245 676 73346 692 73447 708 73548 724 73649 736 73750 752 73851 768 73952 784 74053 796 74154 812 74255 828 74356 844 74457 856 74558 872 74659 888 74760 904 74861 916 74962 932 75063 948 75164 964 75265 976 75366 992 75467 1008 75568 1024 75669 1036 75770 1052 75871 1068 75972 1084 76073 1096 76174 1112 76275 1128 76376 1144 76477 1156 76578 1172 76679 1188 76780 1204 76881 1216 76982 1232 77083 1248 77184 1264 77285 1276 77386 1292 77487 1308 77588 1324 77689 1336 77790 1352 77891 1368 77992 1384 78093 1396 78194 1412 78295 1428 78396 1444 78497 1456 78598 1472 78699 1488 787100 1504 788101 1516 789102 1532 790103 1548 791104 1564 792105 1576 793106 1592 794107 1608 795108 1624 796109 1636 797110 1652 798111 1668 799112 1684 800113 1696 801114 1712 802115 1728 803116 1744 804117 1756 805118 1772 806119 1788 807120 1804 808121 1816 809122 1832 810123 1848 811124 1864 812125 1876 813126 1892 814127 1908 815128 1924 816SELECT COUNT(*) FROM t1; 817COUNT(*) 818128 819SELECT SUM(c2) FROM t1; 820SUM(c2) 821124160 822SHOW CREATE TABLE t1; 823Table Create Table 824t1 CREATE TABLE `t1` ( 825 `c1` bigint(20) NOT NULL AUTO_INCREMENT, 826 `c2` bigint(20) DEFAULT NULL, 827 `c3` varchar(2048) DEFAULT NULL, 828 `c4` varchar(2048) DEFAULT NULL, 829 PRIMARY KEY (`c1`), 830 KEY `idx1` (`c2`), 831 KEY `idx2` (`c3`(512)), 832 KEY `idx3` (`c4`(512)) 833) ENGINE=InnoDB AUTO_INCREMENT=129 DEFAULT CHARSET=latin1 834DROP TABLE t1; 835CREATE TABLE t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; 836INSERT IGNORE INTO t1 VALUES 837(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 2731)); 838Warnings: 839Warning 1265 Data truncated for column 'c2' at row 1 840INSERT INTO t1 841SELECT 100, REPEAT('Karanbir', 128), REPEAT('Ajeeth', 1200) 842FROM seq_1_to_256; 843FLUSH TABLES t1 FOR EXPORT; 844backup: t1 845UNLOCK TABLES; 846DROP TABLE t1; 847CREATE TABLE t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; 848ALTER TABLE t1 DISCARD TABLESPACE; 849SELECT COUNT(*) FROM t1; 850ERROR HY000: Tablespace has been discarded for table `t1` 851restore: t1 .ibd and .cfg files 852SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1"; 853ALTER TABLE t1 IMPORT TABLESPACE; 854ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption 855SET SESSION debug_dbug=@saved_debug_dbug; 856DROP TABLE t1; 857unlink: t1.ibd 858unlink: t1.cfg 859CREATE TABLE t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; 860ALTER TABLE t1 DISCARD TABLESPACE; 861SELECT COUNT(*) FROM t1; 862ERROR HY000: Tablespace has been discarded for table `t1` 863restore: t1 .ibd and .cfg files 864SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure"; 865ALTER TABLE t1 IMPORT TABLESPACE; 866ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption 867SET SESSION debug_dbug=@saved_debug_dbug; 868DROP TABLE t1; 869unlink: t1.ibd 870unlink: t1.cfg 871CREATE TABLE t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; 872ALTER TABLE t1 DISCARD TABLESPACE; 873SELECT COUNT(*) FROM t1; 874ERROR HY000: Tablespace has been discarded for table `t1` 875restore: t1 .ibd and .cfg files 876SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2"; 877ALTER TABLE t1 IMPORT TABLESPACE; 878ERROR HY000: Index corrupt: Externally stored column(5) has a reference length of 19 in the cluster index GEN_CLUST_INDEX 879SET SESSION debug_dbug=@saved_debug_dbug; 880DROP TABLE t1; 881unlink: t1.ibd 882unlink: t1.cfg 883CREATE TABLE t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; 884ALTER TABLE t1 DISCARD TABLESPACE; 885SELECT COUNT(*) FROM t1; 886ERROR HY000: Tablespace has been discarded for table `t1` 887restore: t1 .ibd and .cfg files 888SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3"; 889ALTER TABLE t1 IMPORT TABLESPACE; 890ERROR HY000: Index for table 't1' is corrupt; try to repair it 891SET SESSION debug_dbug=@saved_debug_dbug; 892DROP TABLE t1; 893unlink: t1.ibd 894unlink: t1.cfg 895CREATE TABLE t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; 896SET SESSION debug_dbug="+d,ib_import_create_index_failure_1"; 897ALTER TABLE t1 ADD INDEX idx(c1); 898ERROR HY000: The table 't1' is full 899SET SESSION debug_dbug=@saved_debug_dbug; 900ALTER TABLE t1 DISCARD TABLESPACE; 901SELECT COUNT(*) FROM t1; 902ERROR HY000: Tablespace has been discarded for table `t1` 903ALTER TABLE t1 ADD INDEX idx(c1); 904DROP TABLE t1; 905unlink: t1.ibd 906unlink: t1.cfg 907CREATE TABLE t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; 908ALTER TABLE t1 DISCARD TABLESPACE; 909SELECT COUNT(*) FROM t1; 910ERROR HY000: Tablespace has been discarded for table `t1` 911restore: t1 .ibd and .cfg files 912SET SESSION debug_dbug="+d,fil_space_create_failure"; 913ALTER TABLE t1 IMPORT TABLESPACE; 914ERROR HY000: Got error 11 'Generic error' from ./test/t1.ibd 915SET SESSION debug_dbug=@saved_debug_dbug; 916DROP TABLE t1; 917unlink: t1.ibd 918unlink: t1.cfg 919CREATE TABLE t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; 920ALTER TABLE t1 DISCARD TABLESPACE; 921SELECT COUNT(*) FROM t1; 922ERROR HY000: Tablespace has been discarded for table `t1` 923restore: t1 .ibd and .cfg files 924SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; 925ALTER TABLE t1 IMPORT TABLESPACE; 926ERROR HY000: Got error 39 'Data structure corruption' from ./test/t1.ibd 927SET SESSION debug_dbug=@saved_debug_dbug; 928DROP TABLE t1; 929unlink: t1.ibd 930unlink: t1.cfg 931CREATE TABLE t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb; 932ALTER TABLE t1 DISCARD TABLESPACE; 933SELECT COUNT(*) FROM t1; 934ERROR HY000: Tablespace has been discarded for table `t1` 935restore: t1 .ibd and .cfg files 936SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure"; 937ALTER TABLE t1 IMPORT TABLESPACE; 938ERROR HY000: Index for table 't1' is corrupt; try to repair it 939SET SESSION debug_dbug=@saved_debug_dbug; 940DROP TABLE t1; 941unlink: t1.ibd 942unlink: t1.cfg 943SET GLOBAL INNODB_FILE_PER_TABLE=@file_per_table; 944