summaryrefslogtreecommitdiff
path: root/mysql-test/r/range.result
diff options
context:
space:
mode:
authorsergefp@mysql.com <>2004-06-22 04:47:28 +0400
committersergefp@mysql.com <>2004-06-22 04:47:28 +0400
commitf874071a265ae2729a2e8eb26dbfad5516f0880c (patch)
treeb87bd41117f45565a9107145e291d6bd1d0558c6 /mysql-test/r/range.result
parent7a9f4c6a2abdbe088a4d3740d488da3d8b9b5055 (diff)
downloadmariadb-git-f874071a265ae2729a2e8eb26dbfad5516f0880c.tar.gz
Range optimizer fix:
If cost(full_scan_on_shortest_covering_index) < cost(best_range_scan) < cost(full_table_scan) use full_scan_on_shortest_covering_index (before this fix best_range_scan was used)
Diffstat (limited to 'mysql-test/r/range.result')
-rw-r--r--mysql-test/r/range.result6
1 files changed, 3 insertions, 3 deletions
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index 290e72d3b55..244dcbd03d4 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -244,10 +244,10 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range x x 5 NULL 2 Using where
explain select count(*) from t1 where x in (1);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range x x 5 NULL 1 Using where; Using index
+1 SIMPLE t1 index x x 5 NULL 9 Using where; Using index
explain select count(*) from t1 where x in (1,2);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range x x 5 NULL 2 Using where; Using index
+1 SIMPLE t1 index x x 5 NULL 9 Using where; Using index
drop table t1;
CREATE TABLE t1 (key1 int(11) NOT NULL default '0', KEY i1 (key1));
INSERT INTO t1 VALUES (0),(0),(1),(1);
@@ -255,7 +255,7 @@ CREATE TABLE t2 (keya int(11) NOT NULL default '0', KEY j1 (keya));
INSERT INTO t2 VALUES (0),(0),(1),(1),(2),(2);
explain select * from t1, t2 where (t1.key1 <t2.keya + 1) and t2.keya=3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref j1 j1 4 const 1 Using where; Using index
+1 SIMPLE t2 ref j1 j1 4 const 1 Using index
1 SIMPLE t1 ALL i1 NULL NULL NULL 4 Range checked for each record (index map: 0x1)
DROP TABLE t1,t2;
CREATE TABLE t1 (