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
This commit is contained in:
Sergei Golubchik 2013-04-09 15:50:30 +02:00
commit cdc01e29d3
23 changed files with 213 additions and 243 deletions

View file

@ -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;

View file

@ -1668,16 +1668,6 @@ SELECT * FROM t1;
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 #

View file

@ -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;

View file

@ -15,14 +15,39 @@ 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 #