3238 Olav Sandstaa 2010-11-12
WL#5639 "Enable Index Condition Pushdown optimizer feature"
Changes to test result files after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/create.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/ctype_collate.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/explain.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/index_merge_innodb.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/index_merge_myisam.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/innodb_mrr_none.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/join_cache_jcl1.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/join_nested.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/join_optimizer.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/merge.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/mix2_myisam.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/myisam.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/null.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/r/ps_1general.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/suite/innodb/r/innodb.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
@ mysql-test/suite/innodb/r/innodb_mysql.result
Changes to test result file after enabling Index Condition
Pushdown (ICP).
modified:
mysql-test/r/create.result
mysql-test/r/ctype_collate.result
mysql-test/r/explain.result
mysql-test/r/index_merge_innodb.result
mysql-test/r/index_merge_myisam.result
mysql-test/r/innodb_mrr_none.result
mysql-test/r/join_cache_jcl1.result
mysql-test/r/join_nested.result
mysql-test/r/join_optimizer.result
mysql-test/r/merge.result
mysql-test/r/mix2_myisam.result
mysql-test/r/myisam.result
mysql-test/r/null.result
mysql-test/r/ps_1general.result
mysql-test/suite/innodb/r/innodb.result
mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result
mysql-test/suite/innodb/r/innodb_mysql.result
3237 Olav Sandstaa 2010-11-12 [merge]
Merge WL#5639 "Enable Index Condition Pushdown optimizer feature" from
mysql-next-mr-opt-backporting to mysql-next-mr-opt-team.
Note that changes to result files caused by enabling Index Condition
Pushdown will be committed in a separate patch.
modified:
mysql-test/r/index_merge_myisam.result
mysql-test/r/mysqld--help-notwin.result
mysql-test/r/mysqld--help-win.result
mysql-test/r/optimizer_switch.result
mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
sql/sql_priv.h
sql/sys_vars.cc
3236 Tor Didriksen 2010-11-12 [merge]
Automerge next-mr-opt-backporting => next-mr-opt-team
removed:
mysql-test/suite/optimizer_unfixed_bugs/
mysql-test/suite/optimizer_unfixed_bugs/README.txt
mysql-test/suite/optimizer_unfixed_bugs/r/
mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result
mysql-test/suite/optimizer_unfixed_bugs/r/bug49129.result
mysql-test/suite/optimizer_unfixed_bugs/t/
mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test
mysql-test/suite/optimizer_unfixed_bugs/t/bug49129.test
modified:
client/mysqlbinlog.cc
client/mysqlcheck.c
client/mysqltest.cc
extra/comp_err.c
extra/resolve_stack_dump.c
include/my_sys.h
mysql-test/include/icp_tests.inc
mysql-test/r/innodb_icp.result
mysql-test/r/innodb_icp_all.result
mysql-test/r/innodb_icp_none.result
mysql-test/r/myisam_icp.result
mysql-test/r/myisam_icp_all.result
mysql-test/r/myisam_icp_none.result
mysys/array.c
mysys/default.c
mysys/mf_tempdir.c
sql-common/client.c
sql/item_func.cc
sql/mysqld.cc
sql/opt_range.cc
sql/rpl_filter.cc
sql/rpl_handler.cc
sql/rpl_slave.cc
sql/set_var.h
sql/sp_head.cc
sql/sp_pcontext.cc
sql/sp_pcontext.h
sql/sql_array.h
sql/sql_audit.cc
sql/sql_plugin.cc
sql/sql_select.cc
sql/sql_select.h
sql/sql_show.cc
sql/sql_test.cc
sql/uniques.cc
storage/federated/ha_federated.cc
=== modified file 'mysql-test/r/create.result'
=== modified file 'mysql-test/r/create.result'
--- a/mysql-test/r/create.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/create.result 2010-11-12 13:40:29 +0000
@@ -113,7 +113,7 @@
create table t2 (key (b)) select * from t1;
explain select * from t2 where b="world";
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref B B 21 const 1 Using where
+1 SIMPLE t2 ref B B 21 const 1 Using index condition
select * from t2 where b="world";
a B
3 world
=== modified file 'mysql-test/r/ctype_collate.result'
--- a/mysql-test/r/ctype_collate.result 2010-11-05 14:19:52 +0000
+++ b/mysql-test/r/ctype_collate.result 2010-11-12 13:40:29 +0000
@@ -596,31 +596,31 @@
INSERT INTO t1 VALUES ('j','j');
EXPLAIN SELECT * FROM t1 WHERE s1='a';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref s1 s1 11 const 1 Using where
+1 SIMPLE t1 ref s1 s1 11 const 1 Using index condition
EXPLAIN SELECT * FROM t1 WHERE s2='a';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref s2 s2 11 const 1 Using where
+1 SIMPLE t1 ref s2 s2 11 const 1 Using index condition
EXPLAIN SELECT * FROM t1 WHERE s1='a' COLLATE latin1_german1_ci;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref s1 s1 11 const 1 Using where
+1 SIMPLE t1 ref s1 s1 11 const 1 Using index condition
EXPLAIN SELECT * FROM t1 WHERE s2='a' COLLATE latin1_german1_ci;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL s2 NULL NULL NULL 10 Using where
EXPLAIN SELECT * FROM t1 WHERE s1 BETWEEN 'a' AND 'b' COLLATE latin1_german1_ci;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range s1 s1 11 NULL 2 Using where
+1 SIMPLE t1 range s1 s1 11 NULL 2 Using index condition
EXPLAIN SELECT * FROM t1 WHERE s2 BETWEEN 'a' AND 'b' COLLATE latin1_german1_ci;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL s2 NULL NULL NULL 10 Using where
EXPLAIN SELECT * FROM t1 WHERE s1 IN ('a','b' COLLATE latin1_german1_ci);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range s1 s1 11 NULL 2 Using where
+1 SIMPLE t1 range s1 s1 11 NULL 2 Using index condition
EXPLAIN SELECT * FROM t1 WHERE s2 IN ('a','b' COLLATE latin1_german1_ci);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL s2 NULL NULL NULL 10 Using where
EXPLAIN SELECT * FROM t1 WHERE s1 LIKE 'a' COLLATE latin1_german1_ci;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range s1 s1 11 NULL 1 Using where
+1 SIMPLE t1 range s1 s1 11 NULL 1 Using index condition
EXPLAIN SELECT * FROM t1 WHERE s2 LIKE 'a' COLLATE latin1_german1_ci;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL s2 NULL NULL NULL 10 Using where
=== modified file 'mysql-test/r/explain.result'
--- a/mysql-test/r/explain.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/explain.result 2010-11-12 13:40:29 +0000
@@ -13,7 +13,7 @@
3 foo
explain select * from t1 where str is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref str str 11 const 1 Using where
+1 SIMPLE t1 ref str str 11 const 1 Using index condition
explain select * from t1 where str="foo";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const str str 11 const 1
=== modified file 'mysql-test/r/index_merge_innodb.result'
--- a/mysql-test/r/index_merge_innodb.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/index_merge_innodb.result 2010-11-12 13:40:29 +0000
@@ -166,7 +166,7 @@
);
explain select * from t1 where pk1 = 1 and pk2 < 80 and key1=0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,key1 PRIMARY 8 NULL 9 Using where
+1 SIMPLE t1 range PRIMARY,key1 PRIMARY 8 NULL 9 Using index condition; Using where
select * from t1 where pk1 = 1 and pk2 < 80 and key1=0;
pk1 pk2 key1 key2 pktail1ok pktail2ok pktail3bad pktail4bad pktail5bad pk2copy badkey filler1 filler2
1 10 0 0 0 0 0 0 0 10 0 filler-data-10 filler2
=== modified file 'mysql-test/r/index_merge_myisam.result'
--- a/mysql-test/r/index_merge_myisam.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/index_merge_myisam.result 2010-11-12 13:40:29 +0000
@@ -19,7 +19,7 @@
test.t0 analyze status OK
explain select * from t0 where key1 < 3 or key1 > 1020;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 range i1 i1 4 NULL 78 Using where
+1 SIMPLE t0 range i1 i1 4 NULL 78 Using index condition
explain
select * from t0 where key1 < 3 or key2 > 1020;
id select_type table type possible_keys key key_len ref rows Extra
@@ -115,7 +115,7 @@
explain select * from t0 where
(key1 < 3 or key2 < 3) and (key3 < 100);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 range i1,i2,i3 i3 4 NULL 95 Using where
+1 SIMPLE t0 range i1,i2,i3 i3 4 NULL 95 Using index condition; Using where
explain select * from t0 where
(key1 < 3 or key2 < 3) and (key3 < 1000);
id select_type table type possible_keys key key_len ref rows Extra
@@ -275,7 +275,7 @@
explain select * from t0,t1 where t0.key1 < 3 and
(t1.key1 = t0.key1 or t1.key8 = t0.key1);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 range i1 i1 4 NULL 3 Using where
+1 SIMPLE t0 range i1 i1 4 NULL 3 Using index condition
1 SIMPLE t1 ALL i1,i8 NULL NULL NULL 1024 Range checked for each record (index map: 0x81)
explain select * from t1 where key1=3 or key2=4
union select * from t1 where key1<4 or key3=5;
@@ -1379,7 +1379,7 @@
);
explain select * from t1 where pk1 = 1 and pk2 < 80 and key1=0;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,key1 PRIMARY 8 NULL 7 Using where
+1 SIMPLE t1 range PRIMARY,key1 PRIMARY 8 NULL 7 Using index condition; Using where
select * from t1 where pk1 = 1 and pk2 < 80 and key1=0;
pk1 pk2 key1 key2 pktail1ok pktail2ok pktail3bad pktail4bad pktail5bad pk2copy badkey filler1 filler2
1 10 0 0 0 0 0 0 0 10 0 filler-data-10 filler2
@@ -1492,19 +1492,19 @@
#
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=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,engine_condition_pushdown=on
+index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=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,engine_condition_pushdown=on
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=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,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
set optimizer_switch=4;
set optimizer_switch=NULL;
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'NULL'
@@ -1530,21 +1530,21 @@
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,engine_condition_pushdown=on
+index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=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,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=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,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=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,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (a int, b int, c int, filler char(100),
@@ -1654,5 +1654,5 @@
set optimizer_switch=default;
show variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
drop table t0, t1;
=== modified file 'mysql-test/r/innodb_mrr_none.result'
--- a/mysql-test/r/innodb_mrr_none.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/innodb_mrr_none.result 2010-11-12 13:40:29 +0000
@@ -527,7 +527,7 @@
START TRANSACTION;
EXPLAIN SELECT * FROM t1 WHERE a > 2 FOR UPDATE;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 2 Using where
+1 SIMPLE t1 range a a 5 NULL 2 Using index condition
SELECT * FROM t1 WHERE a > 2 FOR UPDATE;
dummy a b
3 3 3
=== modified file 'mysql-test/r/join_cache_jcl1.result'
--- a/mysql-test/r/join_cache_jcl1.result 2010-11-05 14:19:52 +0000
+++ b/mysql-test/r/join_cache_jcl1.result 2010-11-12 13:40:29 +0000
@@ -449,7 +449,7 @@
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using where
+1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition
1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
@@ -480,7 +480,7 @@
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where
-1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using where
+1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -756,7 +756,7 @@
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using where
+1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition
1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
@@ -787,7 +787,7 @@
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where
-1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using where
+1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1019,7 +1019,7 @@
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND City.Population > 3000000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population,Country Population 4 NULL # Using where
+1 SIMPLE City range Population,Country Population 4 NULL # Using index condition
1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country #
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND City.Population > 3000000;
@@ -1306,7 +1306,7 @@
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t6 system PRIMARY NULL NULL NULL 1
1 SIMPLE t1 ref t1_affiliateid,t1_metaid t1_affiliateid 4 const 1
-1 SIMPLE t4 ref PRIMARY,t4_formatclassid,t4_formats_idx t4_formats_idx 1 const 1 Using where
+1 SIMPLE t4 ref PRIMARY,t4_formatclassid,t4_formats_idx t4_formats_idx 1 const 1 Using index condition; Using where
1 SIMPLE t5 eq_ref PRIMARY,t5_formattypeid PRIMARY 4 test.t4.formatclassid 1 Using where
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.metaid 1
1 SIMPLE t7 ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using index
@@ -1743,7 +1743,7 @@
where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
-1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using where
+1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition
drop table t1,t2;
#
# Bug #42955: join with GROUP BY/ORDER BY and when BKA is enabled
@@ -2184,7 +2184,7 @@
and table3 .`col_varchar_key` = table2 .`col_varchar_nokey`;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE table2 ALL NULL NULL NULL NULL 2 Using where
-1 SIMPLE table3 ref col_varchar_key col_varchar_key 4 test.table2.col_varchar_nokey 1 Using where
+1 SIMPLE table3 ref col_varchar_key col_varchar_key 4 test.table2.col_varchar_nokey 1 Using index condition; Using where
SELECT table2 .`col_int_key` FROM t1 table2,
t1 table3 force index (`col_varchar_key`)
where table3 .`pk` and table3 .`col_int_key` >= table2 .`pk`
=== modified file 'mysql-test/r/join_nested.result'
--- a/mysql-test/r/join_nested.result 2010-11-05 14:19:52 +0000
+++ b/mysql-test/r/join_nested.result 2010-11-12 13:40:29 +0000
@@ -1447,12 +1447,12 @@
1 SIMPLE t2 ALL NULL NULL NULL NULL X
1 SIMPLE t3 ref a a 5 test.t2.b X
1 SIMPLE t5 ref a a 5 test.t3.b X
-1 SIMPLE t4 ref a a 5 test.t3.b X Using where
+1 SIMPLE t4 ref a a 5 test.t3.b X Using index condition
explain select * from (t4 join t6 on t6.a=t4.b) right join t3 on t4.a=t3.b
join t2 left join (t5 join t7 on t7.a=t5.b) on t5.a=t2.b where t3.a<=>t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL X
-1 SIMPLE t3 ref a a 5 test.t2.b X Using where
+1 SIMPLE t3 ref a a 5 test.t2.b X Using index condition
1 SIMPLE t4 ref a a 5 test.t3.b X
1 SIMPLE t6 ref a a 5 test.t4.b X
1 SIMPLE t5 ref a a 5 test.t2.b X
=== modified file 'mysql-test/r/join_optimizer.result'
--- a/mysql-test/r/join_optimizer.result 2010-11-05 14:19:52 +0000
+++ b/mysql-test/r/join_optimizer.result 2010-11-12 13:40:29 +0000
@@ -33,7 +33,7 @@
WHERE g.domain = 'queue' AND g.type = a.type;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE a ALL NULL NULL NULL NULL 2 Using where
-1 SIMPLE g ref groups_dt groups_dt 70 const,test.a.type 13 Using where
+1 SIMPLE g ref groups_dt groups_dt 70 const,test.a.type 13 Using index condition
drop table t0,t1,t2,t3;
#
# BUG#47217 Lost optimization caused slowdown & wrong result.
@@ -61,7 +61,7 @@
Handler_read_first 0
Handler_read_key 1
Handler_read_last 0
-Handler_read_next 2
+Handler_read_next 0
Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_next 1
=== modified file 'mysql-test/r/merge.result'
--- a/mysql-test/r/merge.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/merge.result 2010-11-12 13:40:29 +0000
@@ -677,7 +677,7 @@
EXPLAIN SELECT * FROM t1 WHERE fileset_id = 2
AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,files PRIMARY 35 NULL 5 Using where
+1 SIMPLE t1 range PRIMARY,files PRIMARY 35 NULL 5 Using index condition
EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2
AND file_code = '0000000115' LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
=== modified file 'mysql-test/r/mix2_myisam.result'
--- a/mysql-test/r/mix2_myisam.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/mix2_myisam.result 2010-11-12 13:40:29 +0000
@@ -1114,11 +1114,11 @@
29267
explain select * from t1 where c between 1 and 2500;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range c c 5 NULL # Using where
+1 SIMPLE t1 range c c 5 NULL # Using index condition
update t1 set c=a;
explain select * from t1 where c between 1 and 2500;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range c c 5 NULL # Using where
+1 SIMPLE t1 range c c 5 NULL # Using index condition
drop table t1,t2;
create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) engine=MyISAM;
insert into t1 (id) values (null),(null),(null),(null),(null);
@@ -1559,7 +1559,7 @@
*a *a*a *
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v,v_2 # 13 const # Using where
+1 SIMPLE t1 ref v,v_2 # 13 const # Using index condition
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
@@ -1735,7 +1735,7 @@
1 SIMPLE t1 ref v v 303 const # Using where; Using index
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 303 const # Using where
+1 SIMPLE t1 ref v v 303 const # Using index condition
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
=== modified file 'mysql-test/r/myisam.result'
--- a/mysql-test/r/myisam.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/myisam.result 2010-11-12 13:40:29 +0000
@@ -368,7 +368,7 @@
1 SIMPLE t1 ALL a NULL NULL NULL 5 Using where
explain select * from t1 force index (a) where a=0 or a=2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 4 NULL 4 Using where
+1 SIMPLE t1 range a a 4 NULL 4 Using index condition
explain select * from t1 where c=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref c,c_2 c 5 const 1
@@ -1234,7 +1234,7 @@
*a *a*a *
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v,v_2 # 13 const # Using where
+1 SIMPLE t1 ref v,v_2 # 13 const # Using index condition
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
@@ -1410,7 +1410,7 @@
1 SIMPLE t1 ref v v 303 const # Using where; Using index
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 303 const # Using where
+1 SIMPLE t1 ref v v 303 const # Using index condition
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
@@ -2436,7 +2436,7 @@
explain select * from t1, t2 where t2.a=t1.a and t2.b + 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
-1 SIMPLE t2 ref a a 4 test.t1.a 1 Using where
+1 SIMPLE t2 ref a a 4 test.t1.a 1 Using index condition
select * from t1, t2 where t2.a=t1.a and t2.b + 1;
a a b filler
0 0 1 filler
=== modified file 'mysql-test/r/mysqld--help-notwin.result'
--- a/mysql-test/r/mysqld--help-notwin.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/mysqld--help-notwin.result 2010-11-12 10:42:51 +0000
@@ -406,8 +406,8 @@
optimizer_switch=option=val[,option=val...], where option
is one of {index_merge, index_merge_union,
index_merge_sort_union, index_merge_intersection,
- engine_condition_pushdown} and val is one of {on, off,
- default}
+ engine_condition_pushdown, index_condition_pushdown} and
+ val is one of {on, off, default}
--performance-schema
Enable the performance schema.
--performance-schema-events-waits-history-long-size=#
@@ -853,7 +853,7 @@
optimizer-join-cache-level 1
optimizer-prune-level 1
optimizer-search-depth 62
-optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
performance-schema FALSE
performance-schema-events-waits-history-long-size 10000
performance-schema-events-waits-history-size 10
=== modified file 'mysql-test/r/mysqld--help-win.result'
--- a/mysql-test/r/mysqld--help-win.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/r/mysqld--help-win.result 2010-11-12 10:42:51 +0000
@@ -406,8 +406,8 @@
optimizer_switch=option=val[,option=val...], where option
is one of {index_merge, index_merge_union,
index_merge_sort_union, index_merge_intersection,
- engine_condition_pushdown} and val is one of {on, off,
- default}
+ engine_condition_pushdown, index_condition_pushdown} and
+ val is one of {on, off, default}
--performance-schema
Enable the performance schema.
--performance-schema-events-waits-history-long-size=#
@@ -857,7 +857,7 @@
optimizer-join-cache-level 1
optimizer-prune-level 1
optimizer-search-depth 62
-optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
performance-schema FALSE
performance-schema-events-waits-history-long-size 10000
performance-schema-events-waits-history-size 10
=== modified file 'mysql-test/r/null.result'
--- a/mysql-test/r/null.result 2010-11-05 14:19:52 +0000
+++ b/mysql-test/r/null.result 2010-11-12 13:40:29 +0000
@@ -148,10 +148,10 @@
(7,7), (8,8), (9,9), (10,10), (11,11), (12,12);
explain select * from t1 where a between 2 and 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 4 NULL 2 Using where
+1 SIMPLE t1 range idx idx 4 NULL 2 Using index condition
explain select * from t1 where a between 2 and 3 or b is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range idx idx 4 NULL 2 Using where
+1 SIMPLE t1 range idx idx 4 NULL 2 Using index condition
drop table t1;
select cast(NULL as signed);
cast(NULL as signed)
=== modified file 'mysql-test/r/optimizer_switch.result'
--- a/mysql-test/r/optimizer_switch.result 2010-10-15 10:32:50 +0000
+++ b/mysql-test/r/optimizer_switch.result 2010-11-08 14:51:09 +0000
@@ -3,47 +3,47 @@
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=on,semijoin=on,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=on,semijoin=on,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off
set optimizer_switch='default';
set optimizer_switch='materialization=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=off,semijoin=on,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=off,semijoin=on,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off
set optimizer_switch='default';
set optimizer_switch='semijoin=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=on,semijoin=off,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=on,semijoin=off,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off
set optimizer_switch='default';
set optimizer_switch='loosescan=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,materialization=on,semijoin=on,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=on,semijoin=on,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off
set optimizer_switch='default';
set optimizer_switch='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,engine_condition_pushdown=on,materialization=off,semijoin=off,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=off,semijoin=off,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off
set optimizer_switch='default';
set optimizer_switch='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,engine_condition_pushdown=on,materialization=off,semijoin=off,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=off,semijoin=off,loosescan=on,firstmatch=on,mrr=on,mrr_cost_based=off
set optimizer_switch='default';
set optimizer_switch='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,engine_condition_pushdown=on,materialization=off,semijoin=off,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=off,semijoin=off,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off
set optimizer_switch='default';
set optimizer_switch='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,engine_condition_pushdown=on,materialization=on,semijoin=off,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=on,semijoin=off,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off
set optimizer_switch='default';
set optimizer_switch='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,engine_condition_pushdown=on,materialization=off,semijoin=on,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off,index_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,materialization=off,semijoin=on,loosescan=off,firstmatch=on,mrr=on,mrr_cost_based=off
set optimizer_switch='default';
create table t1 (a1 char(8), a2 char(8));
create table t2 (b1 char(8), b2 char(8));
=== modified file 'mysql-test/r/ps_1general.result'
--- a/mysql-test/r/ps_1general.result 2010-11-05 14:19:52 +0000
+++ b/mysql-test/r/ps_1general.result 2010-11-12 13:40:29 +0000
@@ -467,9 +467,9 @@
def key_len 253 4096 1 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 27 N 1 31 8
+def Extra 253 255 37 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using index condition; Using filesort
drop table if exists t2;
create table t2 (id smallint, name varchar(20)) ;
prepare stmt1 from ' insert into t2 values(?, ?) ' ;
=== modified file 'mysql-test/suite/innodb/r/innodb.result'
--- a/mysql-test/suite/innodb/r/innodb.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/suite/innodb/r/innodb.result 2010-11-12 13:40:29 +0000
@@ -781,7 +781,7 @@
insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
explain select * from t1 where a > 0 and a < 50;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL # Using where
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL # Using index condition
drop table t1;
create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
@@ -1222,7 +1222,7 @@
623
explain select * from t1 where c between 1 and 2500;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range c c 5 NULL # Using where
+1 SIMPLE t1 range c c 5 NULL # Using index condition
update t1 set c=a;
explain select * from t1 where c between 1 and 2500;
id select_type table type possible_keys key key_len ref rows Extra
@@ -1910,7 +1910,7 @@
*a *a*a *
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v,v_2 # 13 const # Using where
+1 SIMPLE t1 ref v,v_2 # 13 const # Using index condition
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
@@ -2086,7 +2086,7 @@
1 SIMPLE t1 ref v v 303 const # Using where; Using index
explain select * from t1 where v='a';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref v v 303 const # Using where
+1 SIMPLE t1 ref v v 303 const # Using index condition
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
=== modified file 'mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result'
--- a/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result 2010-11-12 13:40:29 +0000
@@ -119,7 +119,7 @@
key_len 4
ref t2.a
rows 1
-Extra Using where
+Extra Using index condition; Using where
id 2
select_type DERIVED
table NULL
@@ -323,7 +323,7 @@
key_len 4
ref t2.a
rows 1
-Extra Using where
+Extra Using index condition; Using where
id 2
select_type DERIVED
table NULL
=== modified file 'mysql-test/suite/innodb/r/innodb_mysql.result'
--- a/mysql-test/suite/innodb/r/innodb_mysql.result 2010-11-05 16:23:32 +0000
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result 2010-11-12 13:40:29 +0000
@@ -1375,7 +1375,7 @@
INSERT INTO t1 (a,b,c) SELECT a+4,b,c FROM t1;
EXPLAIN SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range t1_b t1_b 5 NULL 8 Using where
+1 SIMPLE t1 range t1_b t1_b 5 NULL 8 Using index condition
SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5;
a b c
8 1 1
@@ -1787,7 +1787,7 @@
explain select * from t1, t2 where t2.a=t1.a and t2.b + 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
-1 SIMPLE t2 ref a a 4 test.t1.a 1 Using where
+1 SIMPLE t2 ref a a 4 test.t1.a 1 Using index condition
select * from t1, t2 where t2.a=t1.a and t2.b + 1;
a a b filler
0 0 1 filler
=== modified file 'mysql-test/suite/sys_vars/r/optimizer_switch_basic.result'
--- a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result 2010-11-05 14:19:52 +0000
+++ b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result 2010-11-12 10:42:51 +0000
@@ -1,57 +1,57 @@
SET @start_global_value = @@global.optimizer_switch;
SELECT @start_global_value;
@start_global_value
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
show global variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
show session variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
select * from information_schema.global_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
select * from information_schema.session_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
set global optimizer_switch=10;
set session optimizer_switch=5;
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
+index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off
set global optimizer_switch="index_merge_sort_union=on";
set session optimizer_switch="index_merge=off";
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
+index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off
show global variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off
show session variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
+optimizer_switch index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off
select * from information_schema.global_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off
select * from information_schema.session_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off
+OPTIMIZER_SWITCH index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off
set session optimizer_switch="default";
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off
set global optimizer_switch=1.1;
ERROR 42000: Incorrect argument type to variable 'optimizer_switch'
set global optimizer_switch=1e1;
@@ -63,4 +63,4 @@
SET @@global.optimizer_switch = @start_global_value;
SELECT @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on
=== modified file 'sql/sql_priv.h'
--- a/sql/sql_priv.h 2010-11-05 16:23:32 +0000
+++ b/sql/sql_priv.h 2010-11-12 10:42:51 +0000
@@ -150,47 +150,51 @@
#define OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION (1ULL << 2)
#define OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT (1ULL << 3)
#define OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN (1ULL << 4)
-#define OPTIMIZER_SWITCH_MATERIALIZATION (1ULL << 5)
-#define OPTIMIZER_SWITCH_SEMIJOIN (1ULL << 6)
-#define OPTIMIZER_SWITCH_LOOSE_SCAN (1ULL << 7)
-#define OPTIMIZER_SWITCH_FIRSTMATCH (1ULL << 8)
+#define OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN (1ULL << 5)
+#define OPTIMIZER_SWITCH_MATERIALIZATION (1ULL << 6)
+#define OPTIMIZER_SWITCH_SEMIJOIN (1ULL << 7)
+#define OPTIMIZER_SWITCH_LOOSE_SCAN (1ULL << 8)
+#define OPTIMIZER_SWITCH_FIRSTMATCH (1ULL << 9)
/** If this is off, MRR is never used. */
-#define OPTIMIZER_SWITCH_MRR (1ULL << 9)
+#define OPTIMIZER_SWITCH_MRR (1ULL << 10)
/**
If OPTIMIZER_SWITCH_MRR is on and this is on, MRR is used depending on a
cost-based choice ("automatic"). If OPTIMIZER_SWITCH_MRR is on and this is
off, MRR is "forced" (i.e. used as long as the storage engine is capable of
doing it).
*/
-#define OPTIMIZER_SWITCH_MRR_COST_BASED (1ULL << 10)
-#define OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN (1ULL << 11)
+#define OPTIMIZER_SWITCH_MRR_COST_BASED (1ULL << 11)
#define OPTIMIZER_SWITCH_LAST (1ULL << 12)
/**
If OPTIMIZER_SWITCH_ALL is defined, optimizer_switch flags for newer
- optimizer features (semijoin, MRR, ICP) will be available.
+ optimizer features (semijoin, MRR) will be available.
*/
#undef OPTIMIZER_SWITCH_ALL
-/* The following must be kept in sync with optimizer_switch_str in mysqld.cc */
+/*
+ The following must be kept in sync with optimizer_switch string in
+ sys_vars.cc.
+*/
#ifdef OPTIMIZER_SWITCH_ALL
#define OPTIMIZER_SWITCH_DEFAULT (OPTIMIZER_SWITCH_INDEX_MERGE | \
OPTIMIZER_SWITCH_INDEX_MERGE_UNION | \
OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION | \
OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT | \
OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN |\
+ OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN | \
OPTIMIZER_SWITCH_MATERIALIZATION | \
OPTIMIZER_SWITCH_SEMIJOIN | \
OPTIMIZER_SWITCH_LOOSE_SCAN | \
OPTIMIZER_SWITCH_FIRSTMATCH | \
- OPTIMIZER_SWITCH_MRR | \
+ OPTIMIZER_SWITCH_MRR)
+#else
+#define OPTIMIZER_SWITCH_DEFAULT (OPTIMIZER_SWITCH_INDEX_MERGE | \
+ OPTIMIZER_SWITCH_INDEX_MERGE_UNION | \
+ OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION | \
+ OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT | \
+ OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN |\
OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN)
-#else
-#define OPTIMIZER_SWITCH_DEFAULT (OPTIMIZER_SWITCH_INDEX_MERGE | \
- OPTIMIZER_SWITCH_INDEX_MERGE_UNION | \
- OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION | \
- OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT | \
- OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN)
#endif
/*
Replication uses 8 bytes to store SQL_MODE in the binary log. The day you
=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc 2010-11-02 11:53:54 +0000
+++ b/sql/sys_vars.cc 2010-11-08 14:51:09 +0000
@@ -1412,9 +1412,10 @@
{
"index_merge", "index_merge_union", "index_merge_sort_union",
"index_merge_intersection", "engine_condition_pushdown",
+ "index_condition_pushdown",
#ifdef OPTIMIZER_SWITCH_ALL
"materialization", "semijoin", "loosescan", "firstmatch",
- "mrr", "mrr_cost_based", "index_condition_pushdown",
+ "mrr", "mrr_cost_based",
#endif
"default", NullS
};
@@ -1431,11 +1432,11 @@
"optimizer_switch",
"optimizer_switch=option=val[,option=val...], where option is one of "
"{index_merge, index_merge_union, index_merge_sort_union, "
- "index_merge_intersection, engine_condition_pushdown"
+ "index_merge_intersection, engine_condition_pushdown, "
+ "index_condition_pushdown"
#ifdef OPTIMIZER_SWITCH_ALL
", materialization, "
- "semijoin, loosescan, firstmatch, mrr, mrr_cost_based, "
- "index_condition_pushdown"
+ "semijoin, loosescan, firstmatch, mrr, mrr_cost_based"
#endif
"} and val is one of {on, off, default}",
SESSION_VAR(optimizer_switch), CMD_LINE(REQUIRED_ARG),
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-next-mr-bugfixing branch (olav.sandstaa:3236 to 3238)WL#5639 | Olav Sandstaa | 12 Nov |