mirror of
https://github.com/MariaDB/server.git
synced 2025-05-07 04:01:59 +03:00
'derived_merge': - if the flag is off then all derived tables are materialized - if the flag is on then mergeable derived tables are merged 'derived_with_keys': - if the flag is off then no keys are created for derived tables - if the flag is on then for any derived table a key to access the derived table may be created. Now by default both flags are on. Later the default values for the flags will be off to comply with the current behaviour of mysql-5.1. Uncommented previously commented out test case from parts.partition_repair_myisam after having added an explicit requirement to materialize the derived table used in the test case.
103 lines
12 KiB
Plaintext
103 lines
12 KiB
Plaintext
#
|
|
# Generic @@optimizer_switch tests
|
|
#
|
|
#
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch='index_merge=off,index_merge_union=off';
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch='index_merge_union=on';
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch='default,index_merge_sort_union=off';
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch=4;
|
|
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of '4'
|
|
set optimizer_switch=NULL;
|
|
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'NULL'
|
|
set optimizer_switch='default,index_merge';
|
|
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge'
|
|
set optimizer_switch='index_merge=index_merge';
|
|
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge=index_merge'
|
|
set optimizer_switch='index_merge=on,but...';
|
|
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'but...'
|
|
set optimizer_switch='index_merge=';
|
|
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge='
|
|
set optimizer_switch='index_merge';
|
|
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge'
|
|
set optimizer_switch='on';
|
|
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'on'
|
|
set optimizer_switch='index_merge=on,index_merge=off';
|
|
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge=off'
|
|
set optimizer_switch='index_merge_union=on,index_merge_union=default';
|
|
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge_union=default'
|
|
set optimizer_switch='default,index_merge=on,index_merge=off,default';
|
|
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'index_merge=off,default'
|
|
set optimizer_switch=default;
|
|
set optimizer_switch='index_merge=off,index_merge_union=off,default';
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch=default;
|
|
select @@global.optimizer_switch;
|
|
@@global.optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set @@global.optimizer_switch=default;
|
|
select @@global.optimizer_switch;
|
|
@@global.optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
#
|
|
# Check index_merge's @@optimizer_switch flags
|
|
#
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
|
|
BUG#37120 optimizer_switch allowable values not according to specification
|
|
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch='default,materialization=off';
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch='default,semijoin=off';
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch='default,loosescan=off';
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=off,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch='default,semijoin=off,materialization=off';
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch='default,materialization=off,semijoin=off';
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch='default,semijoin=off,materialization=off,loosescan=off';
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch='default,semijoin=off,loosescan=off';
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch='default,materialization=off,loosescan=off';
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=off,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|
|
set optimizer_switch=default;
|
|
select @@optimizer_switch;
|
|
@@optimizer_switch
|
|
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=off,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on
|