diff options
author | Joerg Bruehe <joerg@mysql.com> | 2009-02-06 21:58:08 +0100 |
---|---|---|
committer | Joerg Bruehe <joerg@mysql.com> | 2009-02-06 21:58:08 +0100 |
commit | a3e94608d1df72e8eb3742c4845dfbe04134e99c (patch) | |
tree | e48ac23a087ef03bec12c34e100079f2448f5893 /mysql-test/t/having.test | |
parent | bfadc3d277085f548b715ccb4ff2b6e80ba8cc5d (diff) | |
parent | a775ca6d3b2ab5e7a89db8276709eb8420c6333d (diff) | |
download | mariadb-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.test | 11 |
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 |