Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.5.11, 10.6.4
-
None
-
Cent OS 7, Windows
Description
When IFNULL is used in GROUPBY, Unknown column error is thrown when trying to use it in HAVING....
To reproduce:
CREATE TABLE aaaa (a INT, b INT, c int);
SELECT 0 FROM aaaa GROUP BY IFNULL(a,b) HAVING IFNULL( aaaa.a, aaaa.b)<>SUM( IFNULL( aaaa.c, 0));
Result: Error - Unknown column 'aaaa.a' in 'having clause'
Strange is that when SELECT * is used works ok...