summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/myisam-system.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/myisam-system.test
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/myisam-system.test')
-rw-r--r--mysql-test/main/myisam-system.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/main/myisam-system.test b/mysql-test/main/myisam-system.test
new file mode 100644
index 00000000..cece33bb
--- /dev/null
+++ b/mysql-test/main/myisam-system.test
@@ -0,0 +1,29 @@
+#
+# Test how DROP TABLE works if the index or data file doesn't exists
+
+# Initialise
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+
+create table t1 (a int) engine=myisam;
+let $MYSQLD_DATADIR= `select @@datadir`;
+--remove_file $MYSQLD_DATADIR/test/t1.MYI
+--replace_result $MYSQLD_DATADIR ./
+drop table if exists t1;
+create table t1 (a int) engine=myisam;
+--remove_file $MYSQLD_DATADIR/test/t1.MYI
+--replace_result $MYSQLD_DATADIR ./
+--error ER_FILE_NOT_FOUND
+select * from t1;
+--replace_result $MYSQLD_DATADIR ./
+drop table t1;
+create table t1 (a int) engine=myisam;
+--remove_file $MYSQLD_DATADIR/test/t1.MYD
+--replace_result $MYSQLD_DATADIR ./
+--error 29
+select * from t1;
+--replace_result $MYSQLD_DATADIR ./
+drop table t1;
+--error ER_BAD_TABLE_ERROR
+drop table t1;