Bug #31794: no syntax error on SELECT id FROM t HAVING count(*)>2
The HAVING clause is subject to the same rules as the SELECT list about using aggregated and non-aggregated columns. But this was not enforced when processing implicit grouping from using aggregate functions. Fixed by performing the same checks for HAVING as for SELECT. mysql-test/r/func_group.result: Bug #31794: test case mysql-test/t/func_group.test: Bug #31794: test case sql/sql_select.cc: Bug #31794: Check HAVING in addition to SELECT list
Showing
Please register or sign in to comment