Browse Source
file-based table discovery for discovering storage engines
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 filespull/57/head
12 changed files with 483 additions and 182 deletions
-
2mysql-test/r/grant4.result
-
32mysql-test/suite/archive/archive.result
-
28mysql-test/suite/archive/archive.test
-
70mysql-test/suite/archive/discover.result
-
56mysql-test/suite/archive/discover.test
-
4mysql-test/t/grant4.test
-
124sql/discover.cc
-
8sql/discover.h
-
69sql/handler.cc
-
74sql/handler.h
-
197sql/sql_show.cc
-
1storage/archive/ha_archive.cc
@ -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/../`; |
|||
@ -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/../`; |
|||
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue