summaryrefslogtreecommitdiff
path: root/mysql-test/t/having.test
diff options
context:
space:
mode:
authorJoerg Bruehe <joerg@mysql.com>2009-02-06 21:58:08 +0100
committerJoerg Bruehe <joerg@mysql.com>2009-02-06 21:58:08 +0100
commita3e94608d1df72e8eb3742c4845dfbe04134e99c (patch)
treee48ac23a087ef03bec12c34e100079f2448f5893 /mysql-test/t/having.test
parentbfadc3d277085f548b715ccb4ff2b6e80ba8cc5d (diff)
parenta775ca6d3b2ab5e7a89db8276709eb8420c6333d (diff)
downloadmariadb-git-a3e94608d1df72e8eb3742c4845dfbe04134e99c.tar.gz
Merge main 5.0 into 5.0-build
Diffstat (limited to 'mysql-test/t/having.test')
-rw-r--r--mysql-test/t/having.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/having.test b/mysql-test/t/having.test
index 827b83f11a0..adabbb711d4 100644
--- a/mysql-test/t/having.test
+++ b/mysql-test/t/having.test
@@ -432,3 +432,14 @@ select f1 from t1 having max(f1)=f1;
select f1 from t1 group by f1 having max(f1)=f1;
set session sql_mode='';
drop table t1;
+
+
+#
+# Bug #38637: COUNT DISTINCT prevents NULL testing in HAVING clause
+#
+CREATE TABLE t1 ( a INT, b INT);
+INSERT INTO t1 VALUES (1, 1), (2,2), (3, NULL);
+SELECT b, COUNT(DISTINCT a) FROM t1 GROUP BY b HAVING b is NULL;
+DROP TABLE t1;
+
+--echo End of 5.0 tests