summaryrefslogtreecommitdiff
path: root/mysql-test/t/distinct.test
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-08-10 17:37:37 +0300
committermonty@hundin.mysql.fi <>2001-08-10 17:37:37 +0300
commite7575da7bba22e74983374a5a5cca71b182bd23c (patch)
tree2d9d1fce1c8c7170391a58f2fa2731f5c6a02605 /mysql-test/t/distinct.test
parent410faef67eab72a77ad3a69b5fa4770c3150fc65 (diff)
downloadmariadb-git-e7575da7bba22e74983374a5a5cca71b182bd23c.tar.gz
Portability fixes
Added record_rnd_buffer Added --safe-user-create Fix for ALTER TABLE RENAME on windows
Diffstat (limited to 'mysql-test/t/distinct.test')
-rw-r--r--mysql-test/t/distinct.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test
index 29b2fddbe5f..bf8a03ac40d 100644
--- a/mysql-test/t/distinct.test
+++ b/mysql-test/t/distinct.test
@@ -198,3 +198,12 @@ insert into t2 values (1,1),(2,2),(3,3);
select t1.a,sec_to_time(sum(time_to_sec(t))) from t1 left join t2 on (t1.b=t2.a) group by t1.a,t2.b;
select distinct t1.a,sec_to_time(sum(time_to_sec(t))) from t1 left join t2 on (t1.b=t2.a) group by t1.a,t2.b;
drop table t1,t2;
+
+#
+# Test problem with DISTINCT and HAVING
+#
+create table t1 (a int not null,b char(5), c text);
+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;