summaryrefslogtreecommitdiff
path: root/mysql-test/t/distinct.test
diff options
context:
space:
mode:
authorigor@olga.mysql.com <>2007-08-02 12:45:56 -0700
committerigor@olga.mysql.com <>2007-08-02 12:45:56 -0700
commitcf39429295846cf944e3fd1a327c554ebd08942d (patch)
treecb69ff6598e568046e57c591baf10d4a49f2d5b7 /mysql-test/t/distinct.test
parent642b0c00ed99334a5540839c0e6598d7a26c8ac7 (diff)
downloadmariadb-git-cf39429295846cf944e3fd1a327c554ebd08942d.tar.gz
Fixed bug#28404.
This patch adds cost estimation for the queries with ORDER BY / GROUP BY and LIMIT. If there was a ref/range access to the table whose rows were required to be ordered in the result set the optimizer always employed this access though a scan by a different index that was compatible with the required order could be cheaper to produce the first L rows of the result set. Now for such queries the optimizer makes a choice between the cheapest ref/range accesses not compatible with the given order and index scans compatible with it.
Diffstat (limited to 'mysql-test/t/distinct.test')
-rw-r--r--mysql-test/t/distinct.test2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test
index 7310f98cd16..bfdb5f8b9f8 100644
--- a/mysql-test/t/distinct.test
+++ b/mysql-test/t/distinct.test
@@ -97,7 +97,7 @@ explain SELECT t1.a from t1 group by a order by a desc;
explain SELECT distinct t1.a from t1 order by a desc limit 1;
explain SELECT distinct a from t3 order by a desc limit 2;
explain SELECT distinct a,b from t3 order by a+1;
-explain SELECT distinct a,b from t3 order by a limit 10;
+explain SELECT distinct a,b from t3 order by a limit 2;
explain SELECT a,b from t3 group by a,b order by a+1;
drop table t1,t2,t3,t4;