mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +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.
34 lines
1.8 KiB
PHP
34 lines
1.8 KiB
PHP
if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'query_cache_info' and plugin_status='active'`)
|
|
{
|
|
--skip QUERY_CACHE_INFO plugin is not active
|
|
}
|
|
|
|
set global query_cache_type=ON;
|
|
set local query_cache_type=ON;
|
|
set global query_cache_size=1355776;
|
|
|
|
create table t1 (a int not null);
|
|
insert into t1 values (1),(2),(3);
|
|
select * from t1;
|
|
select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info;
|
|
|
|
select @@time_zone into @time_zone;
|
|
select @@default_week_format into @default_week_format;
|
|
select @@character_set_client into @character_set_client;
|
|
select @@character_set_results into @character_set_results;
|
|
select @@sql_mode into @sql_mode;
|
|
select @@div_precision_increment into @div_precision_increment;
|
|
select @@lc_time_names into @lc_time_names;
|
|
select @@max_sort_length into @max_sort_length;
|
|
select @@autocommit into @autocommit;
|
|
select @@group_concat_max_len into @group_concat_max_len;
|
|
select Name into @new_time_zone from mysql.time_zone_name limit 1;
|
|
set time_zone=@new_time_zone,default_week_format=4,character_set_client='binary',character_set_results='utf32',collation_connection='utf32_bin',sql_mode='STRICT_ALL_TABLES',div_precision_increment=7,lc_time_names='ar_SD',autocommit=0, group_concat_max_len=513, max_sort_length=1011;
|
|
--disable_result_log
|
|
select * from t1;
|
|
--enable_result_log
|
|
set time_zone= @time_zone, default_week_format= @default_week_format, character_set_client= @character_set_client,character_set_results= @character_set_results, sql_mode= @sql_mode, div_precision_increment= @div_precision_increment, lc_time_names= @lc_time_names, autocommit= @autocommit, group_concat_max_len= @group_concat_max_len, max_sort_length= @max_sort_length;
|
|
|
|
--sorted_result
|
|
--replace_column 5 # 19 # 23 #
|
|
select * from information_schema.query_cache_info;
|