summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/r
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-02-24 12:51:55 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-02-24 22:16:33 +0200
commit78153cf641aea41166d3e79ae99b57b154f6a027 (patch)
treebd2e0c95da6a651cff2cbc7df6c37986bba6c118 /mysql-test/suite/innodb/r
parentb513e3711743e3ff24b3d14794a0fba87fd18c31 (diff)
downloadmariadb-git-78153cf641aea41166d3e79ae99b57b154f6a027.tar.gz
MDEV-11927 InnoDB change buffer is not being merged
to tables in the system tablespace This is a regression caused by MDEV-11585, which accidentally changed Tablespace::is_undo_tablespace() in an incorrect way, causing the InnoDB system tablespace to be reported as a dedicated undo tablespace, for which the change buffer is not applicable. Tablespace::is_undo_tablespace(): Remove. There were only 2 calls from the function buf_page_io_complete(). Replace those calls as appropriate. Also, merge changes to tablespace import/export tests from MySQL 5.7, and clean up the tests a little further, allowing them to be run with any innodb_page_size. Remove duplicated error injection instrumentation for the import/export tests. In MySQL 5.7, the error injection label buf_page_is_corrupt_failure was renamed to buf_page_import_corrupt_failure. fil_space_extend_must_retry(): Correct a debug assertion (tablespaces can be extended during IMPORT), and remove a TODO comment about compressed temporary tables that was already addressed in MDEV-11816. dict_build_tablespace_for_table(): Correct a comment that no longer holds after MDEV-11816, and assert that ROW_FORMAT=COMPRESSED can only be used in .ibd files.
Diffstat (limited to 'mysql-test/suite/innodb/r')
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result558
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug.result113
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-zip.result475
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522.result30
4 files changed, 80 insertions, 1096 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
deleted file mode 100644
index afd0eca236e..00000000000
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
+++ /dev/null
@@ -1,558 +0,0 @@
-call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
-call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
-call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*");
-call mtr.add_suppression("InnoDB: Page for tablespace ");
-call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x");
-FLUSH TABLES;
-SET SESSION innodb_strict_mode=1;
-CREATE DATABASE test_wl5522;
-CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED;
-INSERT INTO test_wl5522.t1 VALUES (1), (2), (3), (4);
-FLUSH TABLES test_wl5522.t1 FOR EXPORT;
-backup: t1
-UNLOCK TABLES;
-DROP TABLE test_wl5522.t1;
-CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED;
-INSERT INTO test_wl5522.t1 VALUES (1);
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-SELECT COUNT(*) FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_before_commit_crash";
-SELECT * FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Lost connection to MySQL server during query
-SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash";
-SELECT COUNT(*) FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Lost connection to MySQL server during query
-unlink: t1.ibd
-unlink: t1.cfg
-# Restart and reconnect to the server
-DROP TABLE test_wl5522.t1;
-SET SESSION innodb_strict_mode=1;
-CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED;
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-restore: t1 .ibd and .cfg files
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-CHECK TABLE test_wl5522.t1;
-Table Op Msg_type Msg_text
-test_wl5522.t1 check status OK
-SELECT COUNT(*) FROM test_wl5522.t1;
-COUNT(*)
-4
-INSERT INTO test_wl5522.t1 VALUES(400), (500), (600);
-SELECT * FROM test_wl5522.t1;
-c1
-1
-2
-3
-4
-400
-500
-600
-DROP TABLE test_wl5522.t1;
-CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED;
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-SELECT COUNT(*) FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-SET @saved_debug_dbug = @@SESSION.debug_dbug;
-SET SESSION debug_dbug="+d,ib_import_internal_error";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: While updating the <space, root page number> of index GEN_CLUST_INDEX - Generic error
-SET SESSION debug_dbug=@saved_debug_dbug;
-restore: t1 .ibd and .cfg files
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-DROP TABLE test_wl5522.t1;
-CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED;
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-SELECT COUNT(*) FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Too many concurrent transactions
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug=@saved_debug_dbug;
-SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Got error 44 't1.ibd
-SET SESSION debug_dbug=@saved_debug_dbug;
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug=@saved_debug_dbug;
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_cluster_root_adjust_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug=@saved_debug_dbug;
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_cluster_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug=@saved_debug_dbug;
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_sec_root_adjust_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug=@saved_debug_dbug;
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug=@saved_debug_dbug;
-unlink: t1.ibd
-unlink: t1.cfg
-DROP TABLE test_wl5522.t1;
-CREATE TABLE test_wl5522.t1 (
-c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 BIGINT,
-c3 VARCHAR(2048),
-c4 VARCHAR(2048),
-INDEX idx1(c2),
-INDEX idx2(c3(512)),
-INDEX idx3(c4(512))) Engine=InnoDB
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
-SET GLOBAL INNODB_PURGE_STOP_NOW=ON;
-SET GLOBAL innodb_disable_background_merge=ON;
-SET GLOBAL innodb_monitor_reset = ibuf_merges;
-SET GLOBAL innodb_monitor_reset = ibuf_merges_insert;
-INSERT INTO test_wl5522.t1(c2, c3, c4) VALUES
-(1, REPEAT('a', 2048), REPEAT('a', 2048)),
-(2, REPEAT('b', 2048), REPEAT('b', 2048)),
-(3, REPEAT('c', 2048), REPEAT('c', 2048)),
-(4, REPEAT('d', 2048), REPEAT('d', 2048));
-INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
-INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
-INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
-INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
-INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
-DELETE FROM test_wl5522.t1 WHERE c2 = 1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c2 = c2 + c1;
-UPDATE test_wl5522.t1 SET c3 = REPEAT("c2", 1024);
-UPDATE test_wl5522.t1 SET c4 = REPEAT("c4", 1024);
-SHOW CREATE TABLE test_wl5522.t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `c1` bigint(20) NOT NULL AUTO_INCREMENT,
- `c2` bigint(20) DEFAULT NULL,
- `c3` varchar(2048) DEFAULT NULL,
- `c4` varchar(2048) DEFAULT NULL,
- PRIMARY KEY (`c1`),
- KEY `idx1` (`c2`),
- KEY `idx2` (`c3`(512)),
- KEY `idx3` (`c4`(512))
-) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
-SELECT c1, c2 FROM test_wl5522.t1;
-c1 c2
-2 32
-3 48
-4 64
-6 92
-7 108
-8 124
-13 197
-14 213
-15 229
-17 257
-18 273
-19 289
-28 422
-29 438
-30 454
-32 482
-33 498
-34 514
-36 542
-37 558
-38 574
-40 602
-41 618
-42 634
-59 887
-60 903
-61 919
-63 947
-64 963
-65 979
-67 1007
-68 1023
-69 1039
-71 1067
-72 1083
-73 1099
-75 1127
-76 1143
-77 1159
-79 1187
-80 1203
-81 1219
-83 1247
-84 1263
-85 1279
-87 1307
-88 1323
-89 1339
-122 1832
-123 1848
-124 1864
-126 1892
-127 1908
-128 1924
-130 1952
-131 1968
-132 1984
-134 2012
-135 2028
-136 2044
-138 2072
-139 2088
-140 2104
-142 2132
-143 2148
-144 2164
-146 2192
-147 2208
-148 2224
-150 2252
-151 2268
-152 2284
-154 2312
-155 2328
-156 2344
-158 2372
-159 2388
-160 2404
-162 2432
-163 2448
-164 2464
-166 2492
-167 2508
-168 2524
-170 2552
-171 2568
-172 2584
-174 2612
-175 2628
-176 2644
-178 2672
-179 2688
-180 2704
-182 2732
-183 2748
-184 2764
-SELECT COUNT(*) FROM test_wl5522.t1;
-COUNT(*)
-96
-SELECT SUM(c2) FROM test_wl5522.t1;
-SUM(c2)
-145278
-SELECT name
-FROM information_schema.innodb_metrics
-WHERE name = 'ibuf_merges_insert' AND count = 0;
-name
-FLUSH TABLES test_wl5522.t1 FOR EXPORT;
-backup: t1
-UNLOCK TABLES;
-SELECT name
-FROM information_schema.innodb_metrics
-WHERE name = 'ibuf_merges' AND count > 0;
-name
-ibuf_merges
-SELECT name
-FROM information_schema.innodb_metrics
-WHERE name = 'ibuf_merges_inserts' AND count > 0;
-name
-SET GLOBAL innodb_disable_background_merge=OFF;
-SET GLOBAL INNODB_PURGE_RUN_NOW=ON;
-DROP TABLE test_wl5522.t1;
-CREATE TABLE test_wl5522.t1 (
-c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 BIGINT,
-c3 VARCHAR(2048),
-c4 VARCHAR(2048),
-INDEX idx1(c2),
-INDEX idx2(c3(512)),
-INDEX idx3(c4(512))) Engine=InnoDB
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
-SELECT c1, c2 FROM test_wl5522.t1;
-c1 c2
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-restore: t1 .ibd and .cfg files
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-CHECK TABLE test_wl5522.t1;
-Table Op Msg_type Msg_text
-test_wl5522.t1 check status OK
-SELECT c1,c2 FROM test_wl5522.t1;
-c1 c2
-2 32
-3 48
-4 64
-6 92
-7 108
-8 124
-13 197
-14 213
-15 229
-17 257
-18 273
-19 289
-28 422
-29 438
-30 454
-32 482
-33 498
-34 514
-36 542
-37 558
-38 574
-40 602
-41 618
-42 634
-59 887
-60 903
-61 919
-63 947
-64 963
-65 979
-67 1007
-68 1023
-69 1039
-71 1067
-72 1083
-73 1099
-75 1127
-76 1143
-77 1159
-79 1187
-80 1203
-81 1219
-83 1247
-84 1263
-85 1279
-87 1307
-88 1323
-89 1339
-122 1832
-123 1848
-124 1864
-126 1892
-127 1908
-128 1924
-130 1952
-131 1968
-132 1984
-134 2012
-135 2028
-136 2044
-138 2072
-139 2088
-140 2104
-142 2132
-143 2148
-144 2164
-146 2192
-147 2208
-148 2224
-150 2252
-151 2268
-152 2284
-154 2312
-155 2328
-156 2344
-158 2372
-159 2388
-160 2404
-162 2432
-163 2448
-164 2464
-166 2492
-167 2508
-168 2524
-170 2552
-171 2568
-172 2584
-174 2612
-175 2628
-176 2644
-178 2672
-179 2688
-180 2704
-182 2732
-183 2748
-184 2764
-SELECT COUNT(*) FROM test_wl5522.t1;
-COUNT(*)
-96
-SELECT SUM(c2) FROM test_wl5522.t1;
-SUM(c2)
-145278
-SHOW CREATE TABLE test_wl5522.t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `c1` bigint(20) NOT NULL AUTO_INCREMENT,
- `c2` bigint(20) DEFAULT NULL,
- `c3` varchar(2048) DEFAULT NULL,
- `c4` varchar(2048) DEFAULT NULL,
- PRIMARY KEY (`c1`),
- KEY `idx1` (`c2`),
- KEY `idx2` (`c3`(512)),
- KEY `idx3` (`c4`(512))
-) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
-DROP TABLE test_wl5522.t1;
-CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-INSERT IGNORE INTO test_wl5522.t1 VALUES
-(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200));
-Warnings:
-Warning 1265 Data truncated for column 'c2' at row 1
-INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
-INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
-INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
-INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
-INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
-INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
-INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
-INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
-SELECT COUNT(*) FROM test_wl5522.t1;
-COUNT(*)
-256
-FLUSH TABLES test_wl5522.t1 FOR EXPORT;
-backup: t1
-UNLOCK TABLES;
-DROP TABLE test_wl5522.t1;
-CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-SELECT COUNT(*) FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Data structure corruption
-SET SESSION debug_dbug=@saved_debug_dbug;
-DROP TABLE test_wl5522.t1;
-unlink: t1.ibd
-unlink: t1.cfg
-CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-SELECT COUNT(*) FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Data structure corruption
-SET SESSION debug_dbug=@saved_debug_dbug;
-DROP TABLE test_wl5522.t1;
-unlink: t1.ibd
-unlink: t1.cfg
-CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-SELECT COUNT(*) FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Index corrupt: Externally stored column(5) has a reference length of 19 in the cluster index GEN_CLUST_INDEX
-SET SESSION debug_dbug=@saved_debug_dbug;
-DROP TABLE test_wl5522.t1;
-unlink: t1.ibd
-unlink: t1.cfg
-CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-SELECT COUNT(*) FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug=@saved_debug_dbug;
-DROP TABLE test_wl5522.t1;
-unlink: t1.ibd
-unlink: t1.cfg
-CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-SELECT COUNT(*) FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-SET SESSION debug_dbug="+d,ib_import_create_index_failure_1";
-ALTER TABLE test_wl5522.t1 ADD INDEX idx(c1);
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
-SET SESSION debug_dbug=@saved_debug_dbug;
-DROP TABLE test_wl5522.t1;
-unlink: t1.ibd
-unlink: t1.cfg
-CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-SELECT COUNT(*) FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,fil_space_create_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Got error 11 't1.ibd
-SET SESSION debug_dbug=@saved_debug_dbug;
-DROP TABLE test_wl5522.t1;
-unlink: t1.ibd
-unlink: t1.cfg
-CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-SELECT COUNT(*) FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Got error 39 't1.ibd
-SET SESSION debug_dbug=@saved_debug_dbug;
-DROP TABLE test_wl5522.t1;
-unlink: t1.ibd
-unlink: t1.cfg
-CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
-SELECT COUNT(*) FROM test_wl5522.t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
-ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Data structure corruption
-SET SESSION debug_dbug=@saved_debug_dbug;
-DROP TABLE test_wl5522.t1;
-unlink: t1.ibd
-unlink: t1.cfg
-DROP DATABASE test_wl5522;
-set global innodb_monitor_disable = all;
-set global innodb_monitor_reset_all = all;
-set global innodb_monitor_enable = default;
-set global innodb_monitor_disable = default;
-set global innodb_monitor_reset = default;
-set global innodb_monitor_reset_all = default;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
index 765a57b89d1..54f8797f0cb 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
@@ -17,23 +17,18 @@ DROP DATABASE IF EXISTS test_wl5522;
Warnings:
Note 1008 Can't drop database 'test_wl5522'; database doesn't exist
CREATE DATABASE test_wl5522;
-SET SESSION debug_dbug="+d,ib_discard_before_commit_crash";
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB;
INSERT INTO test_wl5522.t1 VALUES(1),(2),(3);
+SET SESSION debug_dbug="+d,ib_discard_before_commit_crash";
ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
ERROR HY000: Lost connection to MySQL server during query
-SET SESSION debug_dbug="-d,ib_discard_before_commit_crash";
DROP TABLE test_wl5522.t1;
SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-@@innodb_file_per_table
-1
-SET SESSION debug_dbug="+d,ib_discard_after_commit_crash";
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = InnoDB;
INSERT INTO test_wl5522.t1 VALUES(1),(2),(3);
+SET SESSION debug_dbug="+d,ib_discard_after_commit_crash";
ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
ERROR HY000: Lost connection to MySQL server during query
-SET SESSION debug_dbug="-d,ib_discard_after_commit_crash";
DROP TABLE test_wl5522.t1;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@ -51,21 +46,18 @@ ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
SELECT COUNT(*) FROM test_wl5522.t1;
ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,ib_import_before_commit_crash";
SELECT * FROM test_wl5522.t1;
ERROR HY000: Tablespace has been discarded for table `t1`
+SET SESSION debug_dbug="+d,ib_import_before_commit_crash";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Lost connection to MySQL server during query
-SET SESSION debug_dbug="-d,ib_import_before_commit_crash";
-SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash";
SELECT COUNT(*) FROM test_wl5522.t1;
ERROR HY000: Tablespace has been discarded for table `t1`
+SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Lost connection to MySQL server during query
unlink: t1.ibd
unlink: t1.cfg
-# Restart and reconnect to the server
-SET SESSION debug_dbug="-d,ib_import_before_checkpoint_crash";
DROP TABLE test_wl5522.t1;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@ -94,13 +86,14 @@ c1
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
+SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,ib_export_io_write_failure_1";
FLUSH TABLES test_wl5522.t1 FOR EXPORT;
Warnings:
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
UNLOCK TABLES;
-SET SESSION debug_dbug="-d,ib_export_io_write_failure_1";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -110,7 +103,7 @@ Warnings:
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
UNLOCK TABLES;
-SET SESSION debug_dbug="-d,ib_export_io_write_failure_2";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -120,7 +113,7 @@ Warnings:
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
UNLOCK TABLES;
-SET SESSION debug_dbug="-d,ib_export_io_write_failure_3";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -130,7 +123,7 @@ Warnings:
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
UNLOCK TABLES;
-SET SESSION debug_dbug="-d,ib_export_io_write_failure_4";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -140,7 +133,7 @@ Warnings:
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
UNLOCK TABLES;
-SET SESSION debug_dbug="-d,ib_export_io_write_failure_5";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -150,7 +143,7 @@ Warnings:
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
UNLOCK TABLES;
-SET SESSION debug_dbug="-d,ib_export_io_write_failure_6";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -160,7 +153,7 @@ Warnings:
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
UNLOCK TABLES;
-SET SESSION debug_dbug="-d,ib_export_io_write_failure_7";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -170,7 +163,7 @@ Warnings:
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
UNLOCK TABLES;
-SET SESSION debug_dbug="-d,ib_export_io_write_failure_8";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -180,7 +173,7 @@ Warnings:
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
UNLOCK TABLES;
-SET SESSION debug_dbug="-d,ib_export_io_write_failure_9";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -190,7 +183,7 @@ Warnings:
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
UNLOCK TABLES;
-SET SESSION debug_dbug="-d,ib_export_io_write_failure_10";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -200,7 +193,7 @@ Warnings:
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
UNLOCK TABLES;
-SET SESSION debug_dbug="-d,ib_export_io_write_failure_11";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -210,7 +203,7 @@ Warnings:
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flush() failed
Warning 1811 IO Write error: (9, Bad file descriptor) t1.cfg flose() failed
UNLOCK TABLES;
-SET SESSION debug_dbug="-d,ib_export_io_write_failure_12";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (100), (200), (300);
@@ -230,7 +223,7 @@ SET SESSION debug_dbug="+d,ib_import_io_read_error_1";
restore: t1 .cfg file
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: IO Read error: while reading index fields.
-SET SESSION debug_dbug="-d,ib_import_io_read_error_1";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -241,7 +234,7 @@ SET SESSION debug_dbug="+d,ib_import_io_read_error_2";
restore: t1 .cfg file
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: IO Read error: while reading index meta-data, expected to read 44 bytes but read only 0 bytes
-SET SESSION debug_dbug="-d,ib_import_io_read_error_2";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -252,7 +245,7 @@ SET SESSION debug_dbug="+d,ib_import_io_read_error_3";
restore: t1 .cfg file
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: IO Read error: while reading number of indexes.
-SET SESSION debug_dbug="-d,ib_import_io_read_error_3";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -263,7 +256,7 @@ SET SESSION debug_dbug="+d,ib_import_io_read_error_4";
restore: t1 .cfg file
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: IO Read error: while reading table column meta-data.
-SET SESSION debug_dbug="-d,ib_import_io_read_error_4";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -274,7 +267,7 @@ SET SESSION debug_dbug="+d,ib_import_io_read_error_5";
restore: t1 .cfg file
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: IO Read error: while reading meta-data export hostname length.
-SET SESSION debug_dbug="-d,ib_import_io_read_error_5";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -285,7 +278,7 @@ SET SESSION debug_dbug="+d,ib_import_io_read_error_6";
restore: t1 .cfg file
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: IO Read error: while reading meta-data table name length.
-SET SESSION debug_dbug="-d,ib_import_io_read_error_6";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -296,7 +289,7 @@ SET SESSION debug_dbug="+d,ib_import_io_read_error_7";
restore: t1 .cfg file
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: IO Read error: while reading autoinc value.
-SET SESSION debug_dbug="-d,ib_import_io_read_error_7";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -307,7 +300,7 @@ SET SESSION debug_dbug="+d,ib_import_io_read_error_8";
restore: t1 .cfg file
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: IO Read error: while reading meta-data header.
-SET SESSION debug_dbug="-d,ib_import_io_read_error_8";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -318,7 +311,7 @@ SET SESSION debug_dbug="+d,ib_import_io_read_error_9";
restore: t1 .cfg file
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: IO Read error: while reading meta-data version.
-SET SESSION debug_dbug="-d,ib_import_io_read_error_9";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -329,7 +322,7 @@ SET SESSION debug_dbug="+d,ib_import_string_read_error";
restore: t1 .cfg file
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: IO Read error: while parsing export hostname.
-SET SESSION debug_dbug="-d,ib_import_string_read_error";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb;
INSERT INTO test_wl5522.t1 VALUES (1);
@@ -340,7 +333,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_OOM_1";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR 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
-SET SESSION debug_dbug="-d,ib_import_OOM_1";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -353,7 +346,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_OOM_2";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR 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
-SET SESSION debug_dbug="-d,ib_import_OOM_2";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -366,7 +359,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_OOM_4";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR 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
-SET SESSION debug_dbug="-d,ib_import_OOM_4";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -379,7 +372,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_OOM_5";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR 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
-SET SESSION debug_dbug="-d,ib_import_OOM_5";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -392,7 +385,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_OOM_6";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR 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
-SET SESSION debug_dbug="-d,ib_import_OOM_6";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -405,7 +398,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_OOM_7";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR 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
-SET SESSION debug_dbug="-d,ib_import_OOM_7";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -418,7 +411,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_OOM_8";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR 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
-SET SESSION debug_dbug="-d,ib_import_OOM_8";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -431,7 +424,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_OOM_9";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR 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
-SET SESSION debug_dbug="-d,ib_import_OOM_9";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -444,7 +437,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_OOM_10";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR 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
-SET SESSION debug_dbug="-d,ib_import_OOM_10";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -456,7 +449,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_internal_error";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: While updating the <space, root page number> of index GEN_CLUST_INDEX - Generic error
-SET SESSION debug_dbug="-d,ib_import_internal_error";
+SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
DROP TABLE test_wl5522.t1;
@@ -469,36 +462,36 @@ SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Too many concurrent transactions
restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure";
+SET SESSION debug_dbug=@saved_debug_dbug;
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Got error 44 'Tablespace not found' from ./test_wl5522/t1.ibd
-SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure";
+SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure";
+SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_cluster_root_adjust_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug="-d,ib_import_cluster_root_adjust_failure";
+SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_cluster_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug="-d,ib_import_cluster_failure";
+SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_sec_root_adjust_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug="-d,ib_import_sec_root_adjust_failure";
+SET SESSION debug_dbug=@saved_debug_dbug;
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug="-d,ib_import_set_max_rowid_failure";
+SET SESSION debug_dbug=@saved_debug_dbug;
unlink: t1.ibd
unlink: t1.cfg
DROP TABLE test_wl5522.t1;
@@ -838,7 +831,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Data structure corruption
-SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -847,10 +840,10 @@ ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
SELECT COUNT(*) FROM test_wl5522.t1;
ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
-SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure";
+SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Data structure corruption
-SET SESSION debug_dbug="-d,buf_page_is_corrupt_failure";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -862,7 +855,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Index corrupt: Externally stored column(5) has a reference length of 19 in the cluster index GEN_CLUST_INDEX
-SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -874,7 +867,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Index for table 't1' is corrupt; try to repair it
-SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -886,7 +879,7 @@ SET SESSION debug_dbug="+d,ib_import_create_index_failure_1";
ALTER TABLE test_wl5522.t1 ADD INDEX idx(c1);
Warnings:
Warning 1814 Tablespace has been discarded for table `t1`
-SET SESSION debug_dbug="-d,ib_import_create_index_failure_1";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -898,7 +891,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,fil_space_create_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Got error 11 'Generic error' from ./test_wl5522/t1.ibd
-SET SESSION debug_dbug="-d,fil_space_create_failure";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -910,7 +903,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Got error 39 'Data structure corruption' from ./test_wl5522/t1.ibd
-SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
@@ -922,7 +915,7 @@ restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Data structure corruption
-SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure";
+SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
unlink: t1.cfg
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-zip.result b/mysql-test/suite/innodb/r/innodb-wl5522-zip.result
deleted file mode 100644
index 54f4bcc8c1f..00000000000
--- a/mysql-test/suite/innodb/r/innodb-wl5522-zip.result
+++ /dev/null
@@ -1,475 +0,0 @@
-call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
-SET SESSION innodb_strict_mode=1;
-CREATE TABLE t1
-(a INT AUTO_INCREMENT PRIMARY KEY,
-b char(22),
-c varchar(255),
-KEY (b))
-ENGINE = InnoDB ROW_FORMAT=COMPRESSED ;
-insert into t1 (b, c) values ('Apa', 'Filler........'),
-('Banan', 'Filler........'), ('Cavalry', '..asdasdfaeraf'),
-('Devotion', 'asdfuihknaskdf'), ('Evolution', 'lsjndofiabsoibeg');
-INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
-INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
-INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
-INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
-INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
-INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
-INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-640
-SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
-a b c
-819 Apa Filler........
-814 Apa Filler........
-809 Apa Filler........
-SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
-a b c
-823 Evolution lsjndofiabsoibeg
-822 Devotion asdfuihknaskdf
-821 Cavalry ..asdasdfaeraf
-t1.frm
-t1.ibd
-# Restarting server
-# Done restarting server
-FLUSH TABLE t1 FOR EXPORT;
-# List before copying files
-t1.cfg
-t1.frm
-t1.ibd
-UNLOCK TABLES;
-INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-1280
-SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
-a b c
-1459 Apa Filler........
-1454 Apa Filler........
-1449 Apa Filler........
-SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
-a b c
-1463 Evolution lsjndofiabsoibeg
-1462 Devotion asdfuihknaskdf
-1461 Cavalry ..asdasdfaeraf
-# Restarting server
-# Done restarting server
-# List before t1 DISCARD
-t1.frm
-t1.ibd
-ALTER TABLE t1 DISCARD TABLESPACE;
-# List after t1 DISCARD
-t1.frm
-ALTER TABLE t1 IMPORT TABLESPACE;
-ALTER TABLE t1 ENGINE InnoDB;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-640
-SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
-a b c
-819 Apa Filler........
-814 Apa Filler........
-809 Apa Filler........
-SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
-a b c
-823 Evolution lsjndofiabsoibeg
-822 Devotion asdfuihknaskdf
-821 Cavalry ..asdasdfaeraf
-t1.cfg
-t1.frm
-t1.ibd
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-640
-SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
-a b c
-819 Apa Filler........
-814 Apa Filler........
-809 Apa Filler........
-SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
-a b c
-823 Evolution lsjndofiabsoibeg
-822 Devotion asdfuihknaskdf
-821 Cavalry ..asdasdfaeraf
-DROP TABLE t1;
-SET SESSION innodb_strict_mode=1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-INSERT INTO t1(c2) VALUES(1);
-ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Tablespace for table 'test/t1' exists. Please DISCARD the tablespace before IMPORT
-SELECT * FROM t1;
-c1 c2
-1 1
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
-INSERT INTO t1(c2) VALUES(1);
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-t1.frm
-t1.ibd
-FLUSH TABLES t1 FOR EXPORT;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-16
-backup: t1
-t1.cfg
-t1.frm
-t1.ibd
-UNLOCK TABLES;
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
-ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT * FROM t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-t1.cfg
-t1.frm
-t1.ibd
-ALTER TABLE t1 IMPORT TABLESPACE;
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-16
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-INSERT INTO t1(c2) VALUES(1);
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-t1.frm
-t1.ibd
-FLUSH TABLES t1 FOR EXPORT;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-16
-backup: t1
-t1.cfg
-t1.frm
-t1.ibd
-UNLOCK TABLES;
-t1.frm
-t1.ibd
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT * FROM t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-t1.cfg
-t1.frm
-t1.ibd
-ALTER TABLE t1 IMPORT TABLESPACE;
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-16
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT, INDEX(c2)) ENGINE=InnoDB
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
-INSERT INTO t1(c2) VALUES(1);
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-FLUSH TABLES t1 FOR EXPORT;
-SELECT COUNT(*) FROM t1 WHERE c2 = 1;
-COUNT(*)
-16
-backup: t1
-t1.cfg
-t1.frm
-t1.ibd
-UNLOCK TABLES;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT, INDEX(c2)) ENGINE=InnoDB
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
-ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT * FROM t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-ALTER TABLE t1 IMPORT TABLESPACE;
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-SELECT COUNT(*) FROM t1 WHERE c2 = 1;
-COUNT(*)
-16
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT, INDEX idx(c2)) ENGINE=InnoDB
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
-INSERT INTO t1(c2) VALUES(1);
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-FLUSH TABLES t1 FOR EXPORT;
-SELECT COUNT(*) FROM t1 WHERE c2 = 1;
-COUNT(*)
-16
-backup: t1
-UNLOCK TABLES;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT, INDEX x(c2)) ENGINE=InnoDB
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
-ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT * FROM t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Schema mismatch (Index x not found in tablespace meta-data file.)
-ALTER TABLE t1 DROP INDEX x;
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
-ALTER TABLE t1 ADD INDEX idx(c2);
-Warnings:
-Warning 1814 Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-ALTER TABLE t1 IMPORT TABLESPACE;
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-SELECT * FROM t1;
-c1 c2
-1 1
-2 1
-3 1
-4 1
-6 1
-7 1
-8 1
-9 1
-13 1
-14 1
-15 1
-16 1
-17 1
-18 1
-19 1
-20 1
-unlink: t1.cfg
-DROP TABLE t1;
-SET GLOBAL innodb_file_per_table = 0;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT) ENGINE=InnoDB;
-INSERT INTO t1(c2) VALUES(1);
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-16
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `c1` int(11) NOT NULL AUTO_INCREMENT,
- `c2` int(11) DEFAULT NULL,
- PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=latin1
-FLUSH TABLES t1 FOR EXPORT;
-Warnings:
-Warning 1809 Table `test`.`t1` in system tablespace
-UNLOCK TABLES;
-DROP TABLE t1;
-SET GLOBAL innodb_file_per_table = 1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT, INDEX idx(c2)) ENGINE=InnoDB
-ROW_FORMAT=COMPRESSED;
-INSERT INTO t1(c2) VALUES(1);
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-INSERT INTO t1(c2) SELECT c2 FROM t1;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `c1` int(11) NOT NULL AUTO_INCREMENT,
- `c2` int(11) DEFAULT NULL,
- PRIMARY KEY (`c1`),
- KEY `idx` (`c2`)
-) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
-SELECT * FROM t1;
-c1 c2
-1 1
-2 1
-3 1
-4 1
-6 1
-7 1
-8 1
-9 1
-13 1
-14 1
-15 1
-16 1
-17 1
-18 1
-19 1
-20 1
-28 1
-29 1
-30 1
-31 1
-32 1
-33 1
-34 1
-35 1
-36 1
-37 1
-38 1
-39 1
-40 1
-41 1
-42 1
-43 1
-FLUSH TABLES t1 FOR EXPORT;
-backup: t1
-UNLOCK TABLES;
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT) ENGINE=InnoDB
-ROW_FORMAT=COMPRESSED;
-ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT * FROM t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Schema mismatch (Number of indexes don't match, table has 1 indexes but the tablespace meta-data file has 2 indexes)
-unlink: t1.ibd
-unlink: t1.cfg
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT,
-c3 INT, INDEX idx(c2)) ENGINE=InnoDB
-ROW_FORMAT=COMPRESSED;
-ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT * FROM t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Schema mismatch (Number of columns don't match, table has 6 columns but the tablespace meta-data file has 5 columns)
-unlink: t1.ibd
-unlink: t1.cfg
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 BIGINT, INDEX idx(c2)) ENGINE=InnoDB
-ROW_FORMAT=COMPRESSED;
-ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT * FROM t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Schema mismatch (Column c2 precise type mismatch.)
-unlink: t1.ibd
-unlink: t1.cfg
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT, INDEX idx(c2)) ENGINE=InnoDB
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT * FROM t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Schema mismatch
-unlink: t1.ibd
-unlink: t1.cfg
-DROP TABLE t1;
-CREATE TABLE t1(
-c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT, INDEX idx(c2)) ENGINE=InnoDB
-ROW_FORMAT=COMPRESSED;
-ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT * FROM t1;
-ERROR HY000: Tablespace has been discarded for table `t1`
-restore: t1 .ibd and .cfg files
-ALTER TABLE t1 IMPORT TABLESPACE;
-CHECK TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-unlink: t1.cfg
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `c1` int(11) NOT NULL AUTO_INCREMENT,
- `c2` int(11) DEFAULT NULL,
- PRIMARY KEY (`c1`),
- KEY `idx` (`c2`)
-) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
-SELECT * FROM t1;
-c1 c2
-1 1
-2 1
-3 1
-4 1
-6 1
-7 1
-8 1
-9 1
-13 1
-14 1
-15 1
-16 1
-17 1
-18 1
-19 1
-20 1
-28 1
-29 1
-30 1
-31 1
-32 1
-33 1
-34 1
-35 1
-36 1
-37 1
-38 1
-39 1
-40 1
-41 1
-42 1
-43 1
-DROP TABLE t1;
-call mtr.add_suppression("Got error -1 when reading table '.*'");
-call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
-call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522.result b/mysql-test/suite/innodb/r/innodb-wl5522.result
index 2ae994e8f3d..e5782755dd8 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522.result
@@ -1,4 +1,5 @@
call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
+call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it");
FLUSH TABLES;
CREATE TABLE t1
(a INT AUTO_INCREMENT PRIMARY KEY,
@@ -29,15 +30,19 @@ a b c
823 Evolution lsjndofiabsoibeg
822 Devotion asdfuihknaskdf
821 Cavalry ..asdasdfaeraf
+CREATE TABLE t2(a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPACT;
t1.frm
t1.ibd
-# Restarting server
-# Done restarting server
-FLUSH TABLE t1 FOR EXPORT;
+t2.frm
+t2.ibd
+FLUSH TABLE t1, t2 FOR EXPORT;
# List before copying files
t1.cfg
t1.frm
t1.ibd
+t2.cfg
+t2.frm
+t2.ibd
UNLOCK TABLES;
INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
SELECT COUNT(*) FROM t1;
@@ -58,9 +63,13 @@ a b c
# List before t1 DISCARD
t1.frm
t1.ibd
+t2.frm
+t2.ibd
ALTER TABLE t1 DISCARD TABLESPACE;
# List after t1 DISCARD
t1.frm
+t2.frm
+t2.ibd
ALTER TABLE t1 IMPORT TABLESPACE;
ALTER TABLE t1 ENGINE InnoDB;
SELECT COUNT(*) FROM t1;
@@ -79,6 +88,8 @@ a b c
t1.cfg
t1.frm
t1.ibd
+t2.frm
+t2.ibd
SELECT COUNT(*) FROM t1;
COUNT(*)
640
@@ -93,6 +104,19 @@ a b c
822 Devotion asdfuihknaskdf
821 Cavalry ..asdasdfaeraf
DROP TABLE t1;
+ALTER TABLE t2 ROW_FORMAT=DYNAMIC;
+ALTER TABLE t2 DISCARD TABLESPACE;
+# List after t2 DISCARD
+t2.frm
+ALTER TABLE t2 IMPORT TABLESPACE;
+ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x4 and the meta-data file has 0x1)
+ALTER TABLE t2 IMPORT TABLESPACE;
+ERROR HY000: Schema mismatch (Expected FSP_SPACE_FLAGS=0x*, .ibd file contains 0x*.)
+DROP TABLE t2;
+SET GLOBAL innodb_file_per_table = 1;
+SELECT @@innodb_file_per_table;
+@@innodb_file_per_table
+1
CREATE TABLE t1(
c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
c2 INT) ENGINE=InnoDB;