summaryrefslogtreecommitdiff
path: root/mysql-test/t/distinct.test
diff options
context:
space:
mode:
authormonty@tik.mysql.fi <>2002-03-02 09:51:24 +0200
committermonty@tik.mysql.fi <>2002-03-02 09:51:24 +0200
commit9d9bcf25e7d6dccd531bea72f68f3317324ea051 (patch)
tree7c46a4aab7560f176209fe10d40e1ec2df488a46 /mysql-test/t/distinct.test
parentc639329afbde2bd9d59b488d43dde355c1c54678 (diff)
downloadmariadb-git-9d9bcf25e7d6dccd531bea72f68f3317324ea051.tar.gz
Fix sorting of NULL values (Should always be first)
Fix problem with HAVING and MAX() IS NOT NULL
Diffstat (limited to 'mysql-test/t/distinct.test')
-rw-r--r--mysql-test/t/distinct.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test
index bf8a03ac40d..b850ec5d562 100644
--- a/mysql-test/t/distinct.test
+++ b/mysql-test/t/distinct.test
@@ -207,3 +207,14 @@ insert into t1 (a) values (1),(2),(3),(4),(1),(2),(3),(4);
select distinct a from t1 group by b,a having a > 2 order by a desc;
select distinct a,c from t1 group by b,c,a having a > 2 order by a desc;
drop table t1;
+
+#
+# Test problem with DISTINCT and ORDER BY DESC
+#
+
+create table t1 (a char(1), key(a)) type=myisam;
+insert into t1 values('1'),('1');
+select * from t1 where a >= '1';
+select distinct a from t1 order by a desc;
+select distinct a from t1 where a >= '1' order by a desc;
+drop table t1;