mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merged 5.0-bugteam -> 5.1-bugteam
This commit is contained in:
@ -424,3 +424,10 @@ select f1 from t1 group by f1 having max(f1)=f1;
|
||||
f1
|
||||
set session sql_mode='';
|
||||
drop table t1;
|
||||
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;
|
||||
b COUNT(DISTINCT a)
|
||||
NULL 1
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user