diff options
Diffstat (limited to 'mysql-test/suite/archive')
-rw-r--r-- | mysql-test/suite/archive/discover.result | 11 | ||||
-rw-r--r-- | mysql-test/suite/archive/discover.test | 20 | ||||
-rw-r--r-- | mysql-test/suite/archive/repair.result | 10 | ||||
-rw-r--r-- | mysql-test/suite/archive/repair.test | 17 |
4 files changed, 54 insertions, 4 deletions
diff --git a/mysql-test/suite/archive/discover.result b/mysql-test/suite/archive/discover.result index 59e79664eb6..4701d70273b 100644 --- a/mysql-test/suite/archive/discover.result +++ b/mysql-test/suite/archive/discover.result @@ -83,8 +83,6 @@ t0.ARZ select * from t0; a flush tables; -select * from t1; -ERROR 42S02: Table 'test.t1' doesn't exist drop table t0; show status like 'Handler_discover'; Variable_name Value @@ -123,3 +121,12 @@ select * from `a/../`; a flush tables; drop table `a/../`; +create database test1; +create table test1.t1 (i int) engine=archive; +drop database test1; +create table t1 (a int) engine=archive; +select * from t1; +a +flush tables; +select * from t1; +ERROR 42S02: Table 'test.t1' doesn't exist diff --git a/mysql-test/suite/archive/discover.test b/mysql-test/suite/archive/discover.test index 0b7e521185d..ad53ffa78c8 100644 --- a/mysql-test/suite/archive/discover.test +++ b/mysql-test/suite/archive/discover.test @@ -72,8 +72,6 @@ drop table t1; select * from t0; remove_file $mysqld_datadir/test/t0.ARZ; flush tables; ---error ER_NO_SUCH_TABLE -select * from t1; drop table t0; --list_files $mysqld_datadir/test show status like 'Handler_discover'; @@ -102,3 +100,21 @@ select * from `a/../`; flush tables; remove_file $mysqld_datadir/test/a@002f@002e@002e@002f.frm; drop table `a/../`; +# +# MDEV-4441 DROP DATABASE with a newly created ARCHIVE table does not work +# +create database test1; +create table test1.t1 (i int) engine=archive; +drop database test1; + +# +# MDEV-4456 Reverse discovery of ARCHIVE table on SELECT after disappearance of ARZ file +# +create table t1 (a int) engine=archive; +select * from t1; +flush tables; +remove_file $mysqld_datadir/test/t1.ARZ; +--error ER_NO_SUCH_TABLE +select * from t1; +--list_files $mysqld_datadir/test + diff --git a/mysql-test/suite/archive/repair.result b/mysql-test/suite/archive/repair.result new file mode 100644 index 00000000000..16f0f2c1608 --- /dev/null +++ b/mysql-test/suite/archive/repair.result @@ -0,0 +1,10 @@ +create table t1 (a int) engine=archive; +insert into t1 values (1); +select * from t1; +Got one of the listed errors +insert into t1 values (2); +ERROR HY000: Table 't1' is marked as crashed and should be repaired +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair error Corrupt +drop table t1; diff --git a/mysql-test/suite/archive/repair.test b/mysql-test/suite/archive/repair.test new file mode 100644 index 00000000000..03946d31ead --- /dev/null +++ b/mysql-test/suite/archive/repair.test @@ -0,0 +1,17 @@ +# +# MDEV-4444 Server crashes with "safe_mutex: Trying to destroy a mutex share->mutex that was locked" on attempt to recover an archive table +# + +--source include/have_archive.inc + +--let $datadir = `SELECT @@datadir` + +create table t1 (a int) engine=archive; +insert into t1 values (1); +--remove_file $datadir/test/t1.ARZ +--error 13,1017 +select * from t1; +--error ER_CRASHED_ON_USAGE +insert into t1 values (2); +repair table t1; +drop table t1; |