summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/myisam_icp.result14
-rw-r--r--mysql-test/t/myisam_icp.test9
2 files changed, 14 insertions, 9 deletions
diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result
index fdb8018dab6..b17d22cbaa6 100644
--- a/mysql-test/r/myisam_icp.result
+++ b/mysql-test/r/myisam_icp.result
@@ -915,15 +915,17 @@ DROP TABLE t1,t2,t3,t4;
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (a int, col int, filler char(100), key(a, col));
-insert into t1 select A.a + 10*B.a +100*C.a, 1234, 'filler' from t0 A, t0 B, t0 C;
+insert into t1 select A.a + 10*B.a, 1234, 'filler' from t0 A, t0 B, t0 C;
+set @tmp_10000051= @@optimizer_switch;
+set optimizer_switch='mrr=off';
# Must not use ICP:
-explain select * from t1 where a between 10 and 20 order by a, col desc;
+explain select * from t1 where a between 5 and 8 order by a desc, col desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 5 NULL 11 Using index condition; Rowid-ordered scan; Using filesort
+1 SIMPLE t1 range a a 5 NULL 39 Using where
+set optimizer_switch= @tmp_10000051;
# Must not use ICP:
-explain select * from t0,t1 where t1.a=t0.a and t1.col<123;
+explain select * from t1 where a=3 and col > 500 order by a desc, col desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where
-1 SIMPLE t1 ref a a 5 test.t0.a 1 Using index condition
+1 SIMPLE t1 range a a 10 NULL 10 Using where
drop table t0, t1;
set optimizer_switch=@myisam_icp_tmp;
diff --git a/mysql-test/t/myisam_icp.test b/mysql-test/t/myisam_icp.test
index ce65cdab3f0..508c282b1dc 100644
--- a/mysql-test/t/myisam_icp.test
+++ b/mysql-test/t/myisam_icp.test
@@ -269,13 +269,16 @@ create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (a int, col int, filler char(100), key(a, col));
-insert into t1 select A.a + 10*B.a +100*C.a, 1234, 'filler' from t0 A, t0 B, t0 C;
+insert into t1 select A.a + 10*B.a, 1234, 'filler' from t0 A, t0 B, t0 C;
+set @tmp_10000051= @@optimizer_switch;
+set optimizer_switch='mrr=off';
--echo # Must not use ICP:
-explain select * from t1 where a between 10 and 20 order by a, col desc;
+explain select * from t1 where a between 5 and 8 order by a desc, col desc;
+set optimizer_switch= @tmp_10000051;
--echo # Must not use ICP:
-explain select * from t0,t1 where t1.a=t0.a and t1.col<123;
+explain select * from t1 where a=3 and col > 500 order by a desc, col desc;
drop table t0, t1;