mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
MDEV-4456 Reverse discovery of ARCHIVE table on SELECT after disappearance of ARZ file
Implement discovery of table non-existence, and related changes: 1. Split GTS_FORCE_DISCOVERY (that was meaning two different things in two different functions) into GTS_FORCE_DISCOVERY and GTS_USE_DISCOVERY. 2. Move GTS_FORCE_DISCOVERY implementation into open_table_def(). 3. In recover_from_failed_open() clear old errors *before* discovery, not after successful discovery. The final error should come from the discovery. 4. On forced discovery delete table .frm first. Discovery will write a new one, if desired. 5. If the frm file exists, but not the table in the engine, force rediscovery if the engine supports it.
This commit is contained in:
parent
bae5b92ae6
commit
d7e0c3cc73
5 changed files with 51 additions and 11 deletions
|
|
@ -124,3 +124,9 @@ 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
|
||||
|
|
|
|||
|
|
@ -107,3 +107,14 @@ 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue