diff options
author | Monty <monty@mariadb.org> | 2019-09-02 14:06:56 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2019-09-03 13:17:32 +0300 |
commit | a071e0e029cd7c155cff1054d9f7f8a6aa898620 (patch) | |
tree | b592c10cb8ca3036688ea19039208eadd485fe7c /mysql-test/include | |
parent | b0ff5a6a7393c057cd201aff63279e45d3e0cc49 (diff) | |
parent | 9cba6c5aa3b15fffc0ca10e92bcb55a126a20701 (diff) | |
download | mariadb-git-a071e0e029cd7c155cff1054d9f7f8a6aa898620.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/alter_table_mdev539.inc | 4 | ||||
-rw-r--r-- | mysql-test/include/common-tests.inc | 10 | ||||
-rw-r--r-- | mysql-test/include/ctype_utf8mb4.inc | 3 | ||||
-rw-r--r-- | mysql-test/include/default_charset.inc | 15 | ||||
-rw-r--r-- | mysql-test/include/default_group_order.cnf | 11 | ||||
-rw-r--r-- | mysql-test/include/default_my.cnf | 1 | ||||
-rw-r--r-- | mysql-test/include/default_mysqld.cnf | 1 | ||||
-rw-r--r-- | mysql-test/include/default_optimizer_switch.inc | 18 | ||||
-rw-r--r-- | mysql-test/include/grant_cache.inc | 11 | ||||
-rw-r--r-- | mysql-test/include/have_hostname_cache.inc | 6 | ||||
-rw-r--r-- | mysql-test/include/restore_charset.inc | 13 |
11 files changed, 85 insertions, 8 deletions
diff --git a/mysql-test/include/alter_table_mdev539.inc b/mysql-test/include/alter_table_mdev539.inc index 66b32473961..ea6d19dfe33 100644 --- a/mysql-test/include/alter_table_mdev539.inc +++ b/mysql-test/include/alter_table_mdev539.inc @@ -2,6 +2,8 @@ --echo # mdev-539: fast build of unique/primary indexes for MyISAM/Aria --echo # +--source include/default_charset.inc + call mtr.add_suppression("Can't find record in '.*'"); --disable_warnings @@ -62,6 +64,6 @@ insert into customer values alter ignore table customer add primary key (c_custkey); show create table customer; select * from customer where c_custkey=3; - +--source include/restore_charset.inc DROP DATABASE dbt3_s001; diff --git a/mysql-test/include/common-tests.inc b/mysql-test/include/common-tests.inc index 204b6d4dd6b..347760bf3c0 100644 --- a/mysql-test/include/common-tests.inc +++ b/mysql-test/include/common-tests.inc @@ -1537,8 +1537,10 @@ select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 25 # Test of left join. # -SET @save_optimizer_switch=@@optimizer_switch; -SET optimizer_switch='outer_join_with_cache=off'; +SET @local_optimizer_switch=@@optimizer_switch; +set @local_join_cache_level=@@join_cache_level; +set @@join_cache_level=2; +set optimizer_switch='outer_join_with_cache=off,join_cache_hashed=off'; insert into t2 (fld1, companynr) values (999999,99); @@ -1572,7 +1574,7 @@ explain select companynr,companyname from t4 left join t2 using (companynr) wher explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0; explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0; -SET optimizer_switch=@save_optimizer_switch; +SET @@optimizer_switch=@local_optimizer_switch; # # Joins with forms. @@ -1581,6 +1583,8 @@ SET optimizer_switch=@save_optimizer_switch; select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; +SET @@join_cache_level=@local_join_cache_level; + # # Search using 'or' with the same referens group. # An interval search will be done first with the first table and after that diff --git a/mysql-test/include/ctype_utf8mb4.inc b/mysql-test/include/ctype_utf8mb4.inc index cb422f66947..34ef983645b 100644 --- a/mysql-test/include/ctype_utf8mb4.inc +++ b/mysql-test/include/ctype_utf8mb4.inc @@ -1,6 +1,7 @@ # # Tests with the utf8mb4 character set # +--source include/default_optimizer_switch.inc --disable_warnings drop table if exists t1,t2; --enable_warnings @@ -1244,7 +1245,9 @@ drop table t1; # SET CHARACTER SET utf8mb4; +--source include/default_charset.inc SHOW VARIABLES LIKE 'character\_set\_%'; +SET @@character_set_server=@save_character_set_server; CREATE DATABASE crashtest DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; USE crashtest; eval CREATE TABLE crashtest (crash char(10)) DEFAULT CHARSET=utf8mb4 ENGINE $engine; diff --git a/mysql-test/include/default_charset.inc b/mysql-test/include/default_charset.inc new file mode 100644 index 00000000000..e5c40100c37 --- /dev/null +++ b/mysql-test/include/default_charset.inc @@ -0,0 +1,15 @@ +# This file sets the default character set that most test expects. + +# In most cases the variables should match the community server defaults. +# The values should be changed if the default character set for the server +# changes and all tests have been updated to supported the new character set + +# The purpose if this file is to allow users to change these defaults +# without having to update all tests. + +--disable_query_log +SET @save_character_set_server= @@character_set_server; +SET @save_collation_server= @@collation_server; +set @@character_set_server="latin1"; +set @@collation_server="latin1_swedish_ci"; +--enable_query_log diff --git a/mysql-test/include/default_group_order.cnf b/mysql-test/include/default_group_order.cnf new file mode 100644 index 00000000000..a4e84ec2c55 --- /dev/null +++ b/mysql-test/include/default_group_order.cnf @@ -0,0 +1,11 @@ +# Define the order that mtr will save groups in the generated my.cnf files +# The --debug-gdb option is just here to force mtr to remember the group order + +[mysqld] +#debug-gdb= +[mariadb] +#debug-gdb= +[embedded] +#debug-gdb= +[server] +#debug-gdb= diff --git a/mysql-test/include/default_my.cnf b/mysql-test/include/default_my.cnf index a46e748daa0..d102c9020cc 100644 --- a/mysql-test/include/default_my.cnf +++ b/mysql-test/include/default_my.cnf @@ -15,6 +15,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA # Use default setting for mysqld processes +!include default_group_order.cnf !include default_mysqld.cnf !include default_client.cnf diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf index 3107b61cbdf..cd9b65a5ce3 100644 --- a/mysql-test/include/default_mysqld.cnf +++ b/mysql-test/include/default_mysqld.cnf @@ -127,4 +127,3 @@ local-infile # tables. Let's enable it in the [server] group, because this group # is read after [mysqld] and [embedded] loose-aria - diff --git a/mysql-test/include/default_optimizer_switch.inc b/mysql-test/include/default_optimizer_switch.inc new file mode 100644 index 00000000000..e9c804be548 --- /dev/null +++ b/mysql-test/include/default_optimizer_switch.inc @@ -0,0 +1,18 @@ +# This file sets the default optimizer flags and optimizer variables that +# most test expects. In most cases the variables should match the community +# server defaults. +# The purpose if this file is to allow users to change these defaults +# without having to update all tests. + +--disable_query_log +set @save_optimizer_switch=@@optimizer_switch; +set @save_join_cache_level=@@join_cache_level; + +set optimizer_switch="index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on"; + +set optimizer_use_condition_selectivity=1; +set optimizer_search_depth=62; +set join_buffer_space_limit=2097152; +set join_cache_level=2; +set join_buffer_size=262144; +--enable_query_log diff --git a/mysql-test/include/grant_cache.inc b/mysql-test/include/grant_cache.inc index cb495e7feae..467c1170563 100644 --- a/mysql-test/include/grant_cache.inc +++ b/mysql-test/include/grant_cache.inc @@ -37,8 +37,13 @@ --source include/add_anonymous_users.inc +set @save_query_cache_size=@@global.query_cache_size; +set @save_sql_mode=@@global.sql_mode; +set @save_query_cache_type=@@global.query_cache_type; + set GLOBAL sql_mode=""; set LOCAL sql_mode=""; + # --disable_warnings drop table if exists test.t1,mysqltest.t1,mysqltest.t2; @@ -208,10 +213,10 @@ flush privileges; drop table test.t1,mysqltest.t1,mysqltest.t2; drop database mysqltest; -set GLOBAL query_cache_size=default; set GLOBAL query_cache_type=ON; set LOCAL query_cache_type=ON; --source include/delete_anonymous_users.inc -set GLOBAL sql_mode=default; -set GLOBAL query_cache_type=default; +set GLOBAL query_cache_size=@save_query_cache_size; +set GLOBAL sql_mode=@save_sql_mode; +set GLOBAL query_cache_type=@save_query_cache_type; diff --git a/mysql-test/include/have_hostname_cache.inc b/mysql-test/include/have_hostname_cache.inc new file mode 100644 index 00000000000..b6c7c6bd6a6 --- /dev/null +++ b/mysql-test/include/have_hostname_cache.inc @@ -0,0 +1,6 @@ +# Ensure that host_cache is enabled + +if (`SELECT @@skip_name_resolve != "OFF"`) +{ + skip No hostname_cache; +} diff --git a/mysql-test/include/restore_charset.inc b/mysql-test/include/restore_charset.inc new file mode 100644 index 00000000000..afd87838e56 --- /dev/null +++ b/mysql-test/include/restore_charset.inc @@ -0,0 +1,13 @@ +# This file sets the default character set that most test expects. + +# In most cases the variables should match the community server defaults. +# The values should be changed if the default character set for the server +# changes and all tests have been updated to supported the new character set + +# The purpose if this file is to allow users to change these defaults +# without having to update all tests. + +--disable_query_log +SET @@character_set_server=@save_character_set_server; +SET @@collation_server=@save_collation_server; +--enable_query_log |