mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
file-based table discovery for discovering storage engines
also: * move few tests from archive/archive.test to archive/discover.test * fix (unintentionally) bug#34104, updated result files
This commit is contained in:
@ -12785,38 +12785,6 @@ a
|
||||
2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a int) ENGINE=ARCHIVE;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES (1);
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
FLUSH TABLES;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
2
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG#58205 - Valgrind failure in fn_format when called from
|
||||
# archive_discover
|
||||
#
|
||||
CREATE TABLE `a/../`(a INT) ENGINE=ARCHIVE;
|
||||
DROP TABLE `a/../`;
|
||||
#
|
||||
# BUG#57162 - valgrind errors, random data when returning
|
||||
# ordered data from archive tables
|
||||
#
|
||||
|
@ -1711,34 +1711,6 @@ REPAIR TABLE t1 EXTENDED;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (a int) ENGINE=ARCHIVE;
|
||||
SHOW CREATE TABLE t1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
OPTIMIZE TABLE t1;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
remove_file $MYSQLD_DATADIR/test/t1.frm;
|
||||
FLUSH TABLES;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # BUG#58205 - Valgrind failure in fn_format when called from
|
||||
--echo # archive_discover
|
||||
--echo #
|
||||
CREATE TABLE `a/../`(a INT) ENGINE=ARCHIVE;
|
||||
remove_file $MYSQLD_DATADIR/test/a@002f@002e@002e@002f.frm;
|
||||
DROP TABLE `a/../`;
|
||||
|
||||
--echo #
|
||||
--echo # BUG#57162 - valgrind errors, random data when returning
|
||||
--echo # ordered data from archive tables
|
||||
|
70
mysql-test/suite/archive/discover.result
Normal file
70
mysql-test/suite/archive/discover.result
Normal file
@ -0,0 +1,70 @@
|
||||
create table t1 (a int) engine=archive;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
insert t1 values (1);
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
#
|
||||
# simple discover on use
|
||||
#
|
||||
flush tables;
|
||||
insert t1 values (2);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
#
|
||||
# list tables
|
||||
#
|
||||
create table t0 (a int) engine=archive;
|
||||
flush tables;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t0
|
||||
t1
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
#
|
||||
# discover on drop
|
||||
#
|
||||
flush tables;
|
||||
drop table t0, t1;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
#
|
||||
# Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE
|
||||
#
|
||||
create table t1 (a int) engine=archive;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
insert into t1 values (1);
|
||||
optimize table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
flush tables;
|
||||
insert into t1 values (2);
|
||||
select * from t1 order by a;
|
||||
a
|
||||
1
|
||||
2
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
#
|
||||
# BUG#58205 - Valgrind failure in fn_format when called from
|
||||
# archive_discover
|
||||
#
|
||||
create table `a/../`(a int) engine=archive;
|
||||
drop table `a/../`;
|
56
mysql-test/suite/archive/discover.test
Normal file
56
mysql-test/suite/archive/discover.test
Normal file
@ -0,0 +1,56 @@
|
||||
-- source include/have_archive.inc
|
||||
let $mysqld_datadir= `select @@datadir`;
|
||||
|
||||
create table t1 (a int) engine=archive;
|
||||
show create table t1;
|
||||
insert t1 values (1);
|
||||
show tables;
|
||||
|
||||
--echo #
|
||||
--echo # simple discover on use
|
||||
--echo #
|
||||
remove_file $mysqld_datadir/test/t1.frm;
|
||||
flush tables;
|
||||
insert t1 values (2);
|
||||
select * from t1;
|
||||
|
||||
--echo #
|
||||
--echo # list tables
|
||||
--echo #
|
||||
create table t0 (a int) engine=archive;
|
||||
remove_file $mysqld_datadir/test/t1.frm;
|
||||
flush tables;
|
||||
show tables;
|
||||
select * from t1;
|
||||
|
||||
--echo #
|
||||
--echo # discover on drop
|
||||
--echo #
|
||||
remove_file $mysqld_datadir/test/t1.frm;
|
||||
flush tables;
|
||||
drop table t0, t1;
|
||||
show tables;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE
|
||||
--echo #
|
||||
|
||||
create table t1 (a int) engine=archive;
|
||||
show create table t1;
|
||||
insert into t1 values (1);
|
||||
optimize table t1;
|
||||
remove_file $mysqld_datadir/test/t1.frm;
|
||||
flush tables;
|
||||
insert into t1 values (2);
|
||||
select * from t1 order by a;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # BUG#58205 - Valgrind failure in fn_format when called from
|
||||
--echo # archive_discover
|
||||
--echo #
|
||||
create table `a/../`(a int) engine=archive;
|
||||
remove_file $mysqld_datadir/test/a@002f@002e@002e@002f.frm;
|
||||
drop table `a/../`;
|
||||
|
Reference in New Issue
Block a user