mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
9cba6c5aa3
This allows one to run the test suite even if any of the following options are changed: - character-set-server - collation-server - join-cache-level - log-basename - max-allowed-packet - optimizer-switch - query-cache-size and query-cache-type - skip-name-resolve - table-definition-cache - table-open-cache - Some innodb options etc Changes: - Don't print out the value of system variables as one can't depend on them to being constants. - Don't set global variables to 'default' as the default may not be the same as the test was started with if there was an additional option file. Instead save original value and reset it at end of test. - Test that depends on the latin1 character set should include default_charset.inc or set the character set to latin1 - Test that depends on the original optimizer switch, should include default_optimizer_switch.inc - Test that depends on the value of a specific system variable should set it in the test (like optimizer_use_condition_selectivity) - Split subselect3.test into subselect3.test and subselect3.inc to make it easier to set and reset system variables. - Added .opt files for test that required specfic options that could be changed by external configuration files. - Fixed result files in rockdsb & tokudb that had not been updated for a while.
156 lines
2.8 KiB
Text
156 lines
2.8 KiB
Text
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
|
|
db.opt
|
|
t1.ARZ
|
|
t1.frm
|
|
#
|
|
# show tables
|
|
#
|
|
create table t2 (a int) engine=archive;
|
|
select * from t2;
|
|
a
|
|
flush tables;
|
|
show tables;
|
|
Tables_in_test
|
|
t1
|
|
t2
|
|
db.opt
|
|
t1.ARZ
|
|
t2.ARZ
|
|
t2.frm
|
|
#
|
|
# show full tables
|
|
#
|
|
flush tables;
|
|
show full tables;
|
|
Tables_in_test Table_type
|
|
t1 BASE TABLE
|
|
t2 BASE TABLE
|
|
db.opt
|
|
t1.ARZ
|
|
t2.ARZ
|
|
t2.frm
|
|
#
|
|
# discover on truncate
|
|
#
|
|
flush tables;
|
|
truncate table t1;
|
|
ERROR HY000: Storage engine ARCHIVE of the table `test`.`t1` doesn't have this option
|
|
db.opt
|
|
t1.ARZ
|
|
t1.frm
|
|
t2.ARZ
|
|
t2.frm
|
|
#
|
|
# discover on rename
|
|
#
|
|
flush tables;
|
|
rename table t2 to t0;
|
|
db.opt
|
|
t0.ARZ
|
|
t1.ARZ
|
|
t1.frm
|
|
#
|
|
# discover on HA_ERR_TABLE_DEF_CHANGED
|
|
#
|
|
alter table t1 modify a int default 5;
|
|
show create table t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`a` int(11) DEFAULT NULL
|
|
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
|
#
|
|
# discover on drop
|
|
#
|
|
flush tables;
|
|
drop table t1;
|
|
db.opt
|
|
t0.ARZ
|
|
#
|
|
# discover of table non-existance on drop
|
|
#
|
|
select * from t0;
|
|
a
|
|
flush tables;
|
|
drop table t0;
|
|
db.opt
|
|
show status like 'Handler_discover';
|
|
Variable_name Value
|
|
Handler_discover 6
|
|
#
|
|
# 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;
|
|
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
|
|
db.opt
|
|
create table t1 (a int) engine=archive;
|
|
select * from t1;
|
|
a
|
|
flush tables;
|
|
create table t1 (a int) engine=archive;
|
|
flush tables;
|
|
create table t1 (a int) engine=archive;
|
|
ERROR 42S01: Table 't1' already exists
|
|
drop table t1;
|
|
CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE;
|
|
CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE;
|
|
DROP TABLE t1;
|
|
CREATE OR REPLACE TABLE t1 ( pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE = ARCHIVE;
|
|
SELECT * FROM t1;
|
|
pk
|
|
DROP TABLE t1;
|