Commit a8f5b5e8 authored by Igor Babaev's avatar Igor Babaev

Merge.

parents 4b4dfd57 3694bb90
set @innodb_with_mrricp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set optimizer_switch='mrr=off,mrr_sort_keys=off,index_condition_pushdown=off';
set @innodb_test_dont_touch_optimizer_switch=1;
set @innodb_test_tmp=@@optimizer_switch;
set optimizer_switch =
......@@ -786,7 +786,7 @@ create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h
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 index condition
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL # Using where
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');
......@@ -1303,7 +1303,7 @@ count(*)
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 index condition; Rowid-ordered scan
1 SIMPLE t1 range c c 5 NULL # Using where
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
......@@ -1998,7 +1998,7 @@ qq
*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 index condition
1 SIMPLE t1 ref v,v_2 # 13 const # Using where
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
......@@ -2174,7 +2174,7 @@ id select_type table type possible_keys key key_len ref rows Extra
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 index condition
1 SIMPLE t1 ref v v 303 const # Using where
select v,count(*) from t1 group by v limit 10;
v count(*)
a 1
......
set @myisam_icp_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
#
# Bug#36981 - "innodb crash when selecting for update"
#
......@@ -163,7 +165,7 @@ WHERE ts BETWEEN '0000-00-00' AND '2010-00-01 00:00:00'
ORDER BY ts DESC
LIMIT 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using index condition
DROP TABLE t1;
#
......@@ -209,7 +211,7 @@ c-1006=w
EXPLAIN
SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range c1 c1 12 NULL 2 Using where
1 SIMPLE t3 range c1 c1 12 NULL 2 Using index condition; Using where
SELECT c1 FROM t3 WHERE c1 >= 'c-1004=w' and c1 <= 'c-1006=w' and i1 > 2;
c1
EXPLAIN
......@@ -433,7 +435,7 @@ WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
2 DEPENDENT SUBQUERY t2 index NULL PRIMARY 4 NULL 3 Using index
2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func 1 Using where
2 DEPENDENT SUBQUERY it eq_ref PRIMARY PRIMARY 4 func 1 Using index condition
SELECT * FROM t1
WHERE pk IN (SELECT it.pk FROM t2 JOIN t2 AS it ON it.i=it.i WHERE it.pk-t1.i<10);
pk i
......@@ -463,8 +465,6 @@ FROM t3 JOIN t4 ON t4.f11 = t3.f10
f11 f10
DROP TABLE t1,t2,t3,t4;
set optimizer_switch= @tmp_778434;
set @myisam_icp_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
drop table if exists t0, t1, t1i, t1m;
#
# BUG#826935 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed
......
set @innodb_with_mrricp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
set optimizer_switch='mrr=off,mrr_sort_keys=off,index_condition_pushdown=off';
set @innodb_test_dont_touch_optimizer_switch=1;
--source t/innodb.test
......
......@@ -2,11 +2,11 @@
# ICP/MyISAM tests (Index Condition Pushdown)
#
--source include/icp_tests.inc
set @myisam_icp_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
--source include/icp_tests.inc
--disable_warnings
drop table if exists t0, t1, t1i, t1m;
--enable_warnings
......
......@@ -481,7 +481,7 @@ static const char *optimizer_switch_str="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,"
"index_condition_pushdown=off,"
"derived_merge=off,"
"derived_with_keys=off,"
"firstmatch=off,"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment