summaryrefslogtreecommitdiff
path: root/mysql-test/r/order_by.result
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2004-06-22 04:47:28 +0400
committerunknown <sergefp@mysql.com>2004-06-22 04:47:28 +0400
commitb482176b6ddfce3b555111496fb47863c9db5fb8 (patch)
treeb87bd41117f45565a9107145e291d6bd1d0558c6 /mysql-test/r/order_by.result
parent6c50d995c1ce949c8499b609c26a783141f1121f (diff)
downloadmariadb-git-b482176b6ddfce3b555111496fb47863c9db5fb8.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/order_by.result')
-rw-r--r--mysql-test/r/order_by.result4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index 694dc26bcde..6b03dc239e7 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -272,7 +272,7 @@ create table t1 (a int not null, b int, c varchar(10), key (a, b, c));
insert into t1 values (1, NULL, NULL), (1, NULL, 'b'), (1, 1, NULL), (1, 1, 'b'), (1, 1, 'b'), (2, 1, 'a'), (2, 1, 'b'), (2, 2, 'a'), (2, 2, 'b'), (2, 3, 'c'),(1,3,'b');
explain select * from t1 where (a = 1 and b is null and c = 'b') or (a > 2) order by a desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 20 NULL 2 Using where; Using index
+1 SIMPLE t1 index a a 20 NULL 11 Using where; Using index
select * from t1 where (a = 1 and b is null and c = 'b') or (a > 2) order by a desc;
a b c
1 NULL b
@@ -328,7 +328,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 9 NULL 5 Using where; Using index
explain select * from t1 where a = 2 and b < 2 order by a desc,b desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 9 NULL 2 Using where; Using index
+1 SIMPLE t1 ref a a 4 const 2 Using where; Using index
explain select * from t1 where a = 1 order by b desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 4 const 5 Using where; Using index