summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-09 15:50:30 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-09 15:50:30 +0200
commitcdc01e29d3a9f6d98aaa482363af81003485e256 (patch)
tree20c8ce171e2666e720ac5977561997038fe3c2f2 /mysql-test/t
parent15c936e4b3d151346c027bd4b51b44c826b095b6 (diff)
downloadmariadb-git-cdc01e29d3a9f6d98aaa482363af81003485e256.tar.gz
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
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/mdl_sync.test2
-rw-r--r--mysql-test/t/myisam-system.test5
-rw-r--r--mysql-test/t/ps_1general.test5
-rw-r--r--mysql-test/t/rename.test10
-rw-r--r--mysql-test/t/truncate_badse.test15
5 files changed, 27 insertions, 10 deletions
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;
+