mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Set new default values for the optimizer switch flags 'derived_merge'
and 'derived_with_keys'. Now they are set on by default.
This commit is contained in:
@ -97,6 +97,8 @@ insert into t1 values (1,1), (2,null), (3,1), (4,1),
|
||||
# Demonstrate that for the SELECT statement
|
||||
# used later in the test JT_EQ_REF access method is used.
|
||||
#
|
||||
set @tmp_optimizer_switch=@@optimizer_switch;
|
||||
set optimizer_switch='derived_merge=off,derived_with_keys=off';
|
||||
explain
|
||||
select 1 from t1 natural join (select 2 as a, 1 as b union all
|
||||
select 2 as a, 2 as b) as t2 for update;
|
||||
@ -150,6 +152,7 @@ key_len NULL
|
||||
ref NULL
|
||||
rows NULL
|
||||
Extra
|
||||
set optimizer_switch=@tmp_optimizer_switch;
|
||||
#
|
||||
# Demonstrate that the reported SELECT statement
|
||||
# no longer produces warnings.
|
||||
@ -301,6 +304,8 @@ begin;
|
||||
# is retreived and processed first.
|
||||
#
|
||||
# Verify that JT_EQ_REF is used.
|
||||
set @tmp_optimizer_switch=@@optimizer_switch;
|
||||
set optimizer_switch='derived_merge=off,derived_with_keys=off';
|
||||
explain
|
||||
select 1 from t1 natural join (select 3 as a, 2 as b union all
|
||||
select 3 as a, 1 as b) as t2 for update;
|
||||
@ -354,6 +359,7 @@ key_len NULL
|
||||
ref NULL
|
||||
rows NULL
|
||||
Extra
|
||||
set optimizer_switch=@tmp_optimizer_switch;
|
||||
# Lock the record.
|
||||
select 1 from t1 natural join (select 3 as a, 2 as b union all
|
||||
select 3 as a, 1 as b) as t2 for update;
|
||||
|
Reference in New Issue
Block a user