mirror of
https://github.com/MariaDB/server.git
synced 2025-05-28 13:01:41 +03:00
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.
90 lines
2.3 KiB
Plaintext
90 lines
2.3 KiB
Plaintext
#
|
|
# Bug #10901 Analyze Table on new table destroys table
|
|
# This is minimal test case to get error
|
|
# The problem was that analyze table wrote the shared state to the
|
|
# file and this didn't include the inserts while locked. A check was
|
|
# needed to ensure that state information was not updated when
|
|
# executing analyze table for a locked table. The analyze table had
|
|
# to be within locks and check table had to be after unlocking since
|
|
# then it brings the wrong state from disk rather than from the
|
|
# currently correct internal state. The insert is needed since it
|
|
# changes the file state, number of records. The fix is to
|
|
# synchronise the state of the shared state and the current state
|
|
# before calling mi_state_info_write
|
|
#
|
|
|
|
--source include/default_optimizer_switch.inc
|
|
|
|
create table t1 (a bigint);
|
|
lock tables t1 write;
|
|
insert into t1 values(0);
|
|
analyze table t1;
|
|
unlock tables;
|
|
check table t1;
|
|
|
|
drop table t1;
|
|
|
|
create table t1 (a bigint);
|
|
insert into t1 values(0);
|
|
lock tables t1 write;
|
|
delete from t1;
|
|
analyze table t1;
|
|
unlock tables;
|
|
check table t1;
|
|
|
|
drop table t1;
|
|
|
|
create table t1 (a bigint);
|
|
insert into t1 values(0);
|
|
analyze table t1;
|
|
check table t1;
|
|
|
|
drop table t1;
|
|
|
|
# Bug #14902 ANALYZE TABLE fails to recognize up-to-date tables
|
|
# minimal test case to get an error.
|
|
# The problem is happening when analysing table with FT index that
|
|
# contains stopwords only. The first execution of analyze table should
|
|
# mark index statistics as up to date so that next execution of this
|
|
# statement will end up with Table is up to date status.
|
|
create table t1 (a mediumtext, fulltext key key1(a)) charset utf8 collate utf8_general_ci engine myisam;
|
|
insert into t1 values ('hello');
|
|
|
|
analyze table t1;
|
|
analyze table t1;
|
|
|
|
drop table t1;
|
|
|
|
#
|
|
# procedure in PS BUG#13673
|
|
#
|
|
CREATE TABLE t1 (a int);
|
|
prepare stmt1 from "SELECT * FROM t1 PROCEDURE ANALYSE()";
|
|
execute stmt1;
|
|
execute stmt1;
|
|
deallocate prepare stmt1;
|
|
drop table t1;
|
|
|
|
#
|
|
# bug#15225 (ANALYZE temporary has no effect)
|
|
#
|
|
create temporary table t1(a int, index(a));
|
|
insert into t1 values('1'),('2'),('3'),('4'),('5');
|
|
analyze table t1;
|
|
show index from t1;
|
|
drop table t1;
|
|
|
|
--echo End of 4.1 tests
|
|
|
|
#
|
|
# Bug #30495: optimize table t1,t2,t3 extended errors
|
|
#
|
|
create table t1(a int);
|
|
--error 1064
|
|
analyze table t1 extended;
|
|
--error 1064
|
|
optimize table t1 extended;
|
|
drop table t1;
|
|
|
|
--echo End of 5.0 tests
|