mirror of
https://github.com/MariaDB/server.git
synced 2026-05-02 21:25:36 +02:00
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:
parent
15c936e4b3
commit
cdc01e29d3
23 changed files with 213 additions and 243 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 #
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 #
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue