From cdc01e29d3a9f6d98aaa482363af81003485e256 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 9 Apr 2013 15:50:30 +0200 Subject: remove dd_frm_type(), dd_frm_storage_engine(), dd_check_storage_engine_flag() from everywhere - now RENAME, SHOW FULL TABLES, and TRUNCATE work with discovery. improve error messages in truncate --- mysql-test/t/mdl_sync.test | 2 +- mysql-test/t/myisam-system.test | 5 +++++ mysql-test/t/ps_1general.test | 5 +---- mysql-test/t/rename.test | 10 +++++----- mysql-test/t/truncate_badse.test | 15 +++++++++++++++ 5 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 mysql-test/t/truncate_badse.test (limited to 'mysql-test/t') diff --git a/mysql-test/t/mdl_sync.test b/mysql-test/t/mdl_sync.test index 197cad536e4..fef8a9848ca 100644 --- a/mysql-test/t/mdl_sync.test +++ b/mysql-test/t/mdl_sync.test @@ -4382,7 +4382,7 @@ connection default; --echo # Connection con2 connection con2; --echo # Reaping: RENAME TABLE db1.t1 TO test.t1 ---error ER_FILE_NOT_FOUND, ER_FILE_NOT_FOUND +--error ER_NO_SUCH_TABLE --reap --echo # Connection default diff --git a/mysql-test/t/myisam-system.test b/mysql-test/t/myisam-system.test index ef1bc03434d..cece33bb00b 100644 --- a/mysql-test/t/myisam-system.test +++ b/mysql-test/t/myisam-system.test @@ -9,16 +9,21 @@ drop table if exists t1,t2; 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; diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test index 812b1b5ff94..22cad56a8e4 100644 --- a/mysql-test/t/ps_1general.test +++ b/mysql-test/t/ps_1general.test @@ -582,10 +582,7 @@ drop table t2; # cases derived from client_test.c: test_rename() prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ; create table t5 (a int) ; -# rename must fail, t7 does not exist -# Clean up the filename here because embedded server reports whole path ---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' t7.frm t7 ---error ER_FILE_NOT_FOUND +--error ER_NO_SUCH_TABLE execute stmt1 ; create table t7 (a int) ; # rename, t5 -> t6 and t7 -> t8 diff --git a/mysql-test/t/rename.test b/mysql-test/t/rename.test index bb90cbafd74..a55bc845acc 100644 --- a/mysql-test/t/rename.test +++ b/mysql-test/t/rename.test @@ -21,16 +21,16 @@ rename table t3 to t4, t2 to t3, t1 to t2, t4 to t1; select * from t1; # The following should give errors ---error ER_TABLE_EXISTS_ERROR,ER_TABLE_EXISTS_ERROR +--error ER_TABLE_EXISTS_ERROR rename table t1 to t2; ---error ER_TABLE_EXISTS_ERROR,ER_TABLE_EXISTS_ERROR +--error ER_TABLE_EXISTS_ERROR rename table t1 to t1; ---error ER_TABLE_EXISTS_ERROR,ER_TABLE_EXISTS_ERROR +--error ER_TABLE_EXISTS_ERROR rename table t3 to t4, t2 to t3, t1 to t2, t4 to t2; show tables like "t_"; ---error ER_TABLE_EXISTS_ERROR,ER_TABLE_EXISTS_ERROR +--error ER_TABLE_EXISTS_ERROR rename table t3 to t1, t2 to t3, t1 to t2, t4 to t1; ---error ER_FILE_NOT_FOUND,ER_FILE_NOT_FOUND +--error ER_NO_SUCH_TABLE rename table t3 to t4, t5 to t3, t1 to t2, t4 to t1; select * from t1; diff --git a/mysql-test/t/truncate_badse.test b/mysql-test/t/truncate_badse.test new file mode 100644 index 00000000000..71545cab11a --- /dev/null +++ b/mysql-test/t/truncate_badse.test @@ -0,0 +1,15 @@ +# +# test what TRUNCATE TABLE does, if the table was created in +# now-unknown storage engine. +# +--source include/have_example_plugin.inc +install plugin example soname 'ha_example'; +create table t1 (a int) engine=example; +select 1; +uninstall plugin example; +flush tables; +select count(*) from information_schema.plugins where plugin_name='example'; +--error ER_UNKNOWN_STORAGE_ENGINE +truncate table t1; +drop table t1; + -- cgit v1.2.1