summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/innodb-missing-file.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/innodb/t/innodb-missing-file.test')
-rw-r--r--mysql-test/suite/innodb/t/innodb-missing-file.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/innodb-missing-file.test b/mysql-test/suite/innodb/t/innodb-missing-file.test
new file mode 100644
index 00000000000..451e29796ac
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-missing-file.test
@@ -0,0 +1,26 @@
+-- source include/have_innodb.inc
+
+call mtr.add_suppression("A link file was found named './test/t1.isl' but the linked tablespace .* could not be opened.");
+call mtr.add_suppression("InnoDB: Error: could not open single-table tablespace file ./test/t1.ibd");
+call mtr.add_suppression("InnoDB: Table test/t1 in the InnoDB data dictionary has tablespace id [0-9]+, but tablespace with that id or name does not exist. Have you deleted or moved .ibd files\\? This may also be a table created with CREATE TEMPORARY TABLE whose .ibd and .frm files MySQL automatically removed, but the table still exists in the InnoDB internal data dictionary.");
+
+--disable_warnings
+set global innodb_file_format='Barracuda';
+--enable_warnings
+
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+EVAL CREATE TABLE t1(c1 INT) ENGINE=InnoDB DATA DIRECTORY='$MYSQL_TMP_DIR';
+INSERT INTO t1 VALUES(1);
+let $MYSQLD_DATADIR = `SELECT @@datadir`;
+
+--source include/kill_mysqld.inc
+
+--copy_file $MYSQL_TMP_DIR/test/t1.ibd $MYSQL_TMP_DIR/test/t1_1.ibd
+--remove_file $MYSQL_TMP_DIR/test/t1.ibd
+
+--source include/start_mysqld.inc
+--error ER_NO_SUCH_TABLE_IN_ENGINE
+select * from t1;
+drop table t1;
+
+--remove_file $MYSQL_TMP_DIR/test/t1_1.ibd