summaryrefslogtreecommitdiff
path: root/mysql-test/suite
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/suite
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/suite')
-rw-r--r--mysql-test/suite/archive/archive.result10
-rw-r--r--mysql-test/suite/archive/archive.test10
-rw-r--r--mysql-test/suite/archive/discover.result37
-rw-r--r--mysql-test/suite/archive/discover.test29
4 files changed, 61 insertions, 25 deletions
diff --git a/mysql-test/suite/archive/archive.result b/mysql-test/suite/archive/archive.result
index df0db73244a..f5c97cb4dde 100644
--- a/mysql-test/suite/archive/archive.result
+++ b/mysql-test/suite/archive/archive.result
@@ -12749,16 +12749,6 @@ SELECT * FROM t1;
col1 col2
DROP TABLE t1;
#
-# BUG#48757 - missing .ARZ file causes server crash
-#
-CREATE TABLE t1(a INT) ENGINE=ARCHIVE;
-FLUSH TABLE t1;
-SELECT * FROM t1;
-ERROR HY000: Can't find file: './test/t1.ARZ' (errno: 2 "No such file or directory")
-DROP TABLE t1;
-Warnings:
-Warning 2 Can't find file: './test/t1.ARZ' (errno: 2 "No such file or directory")
-#
# Ensure that TRUNCATE fails for non-empty archive tables.
#
CREATE TABLE t1 (a INT) ENGINE=ARCHIVE;
diff --git a/mysql-test/suite/archive/archive.test b/mysql-test/suite/archive/archive.test
index 0dfdc969162..70e32254062 100644
--- a/mysql-test/suite/archive/archive.test
+++ b/mysql-test/suite/archive/archive.test
@@ -1669,16 +1669,6 @@ DROP TABLE t1;
remove_file $MYSQLD_DATADIR/test/t1.ARM;
--echo #
---echo # BUG#48757 - missing .ARZ file causes server crash
---echo #
-CREATE TABLE t1(a INT) ENGINE=ARCHIVE;
-FLUSH TABLE t1;
---remove_file $MYSQLD_DATADIR/test/t1.ARZ
---error ER_FILE_NOT_FOUND
-SELECT * FROM t1;
-DROP TABLE t1;
-
---echo #
--echo # Ensure that TRUNCATE fails for non-empty archive tables.
--echo #
CREATE TABLE t1 (a INT) ENGINE=ARCHIVE;
diff --git a/mysql-test/suite/archive/discover.result b/mysql-test/suite/archive/discover.result
index 51f66ee701b..ae8b69d56b6 100644
--- a/mysql-test/suite/archive/discover.result
+++ b/mysql-test/suite/archive/discover.result
@@ -18,19 +18,50 @@ a
1
2
#
-# list tables
+# show tables
#
-create table t0 (a int) engine=archive;
+create table t2 (a int) engine=archive;
flush tables;
show tables;
Tables_in_test
-t0
t1
+t2
select * from t1;
a
1
2
#
+# show full tables
+#
+flush tables;
+show full tables;
+Tables_in_test Table_type
+t1 BASE TABLE
+t2 BASE TABLE
+select * from t1;
+a
+1
+2
+#
+# discover on truncate
+#
+flush tables;
+truncate table t1;
+ERROR HY000: Table storage engine for 't1' doesn't have this option
+show tables;
+Tables_in_test
+t1
+t2
+#
+# discover on rename
+#
+flush tables;
+rename table t2 to t0;
+show tables;
+Tables_in_test
+t0
+t1
+#
# discover on drop
#
flush tables;
diff --git a/mysql-test/suite/archive/discover.test b/mysql-test/suite/archive/discover.test
index 843cb0caf63..4be90f50a50 100644
--- a/mysql-test/suite/archive/discover.test
+++ b/mysql-test/suite/archive/discover.test
@@ -15,15 +15,40 @@ insert t1 values (2);
select * from t1;
--echo #
---echo # list tables
+--echo # show tables
--echo #
-create table t0 (a int) engine=archive;
+create table t2 (a int) engine=archive;
remove_file $mysqld_datadir/test/t1.frm;
flush tables;
show tables;
select * from t1;
--echo #
+--echo # show full tables
+--echo #
+remove_file $mysqld_datadir/test/t1.frm;
+flush tables;
+show full tables;
+select * from t1;
+
+--echo #
+--echo # discover on truncate
+--echo #
+remove_file $mysqld_datadir/test/t1.frm;
+flush tables;
+--error ER_ILLEGAL_HA
+truncate table t1;
+show tables;
+
+--echo #
+--echo # discover on rename
+--echo #
+remove_file $mysqld_datadir/test/t2.frm;
+flush tables;
+rename table t2 to t0;
+show tables;
+
+--echo #
--echo # discover on drop
--echo #
remove_file $mysqld_datadir/test/t1.frm;