1#
2# Test how DROP TABLE works if the index or data file doesn't exists
3
4# Initialise
5--disable_warnings
6drop table if exists t1,t2;
7--enable_warnings
8
9create table t1 (a int) engine=myisam;
10let $MYSQLD_DATADIR= `select @@datadir`;
11--remove_file $MYSQLD_DATADIR/test/t1.MYI
12--replace_result $MYSQLD_DATADIR ./
13drop table if exists t1;
14create table t1 (a int) engine=myisam;
15--remove_file $MYSQLD_DATADIR/test/t1.MYI
16--replace_result $MYSQLD_DATADIR ./
17--error ER_FILE_NOT_FOUND
18select * from t1;
19--replace_result $MYSQLD_DATADIR ./
20drop table t1;
21create table t1 (a int) engine=myisam;
22--remove_file $MYSQLD_DATADIR/test/t1.MYD
23--replace_result $MYSQLD_DATADIR ./
24--error 29
25select * from t1;
26--replace_result $MYSQLD_DATADIR ./
27drop table t1;
28--error ER_BAD_TABLE_ERROR
29drop table t1;
30