Bug #81024 HAVING without GROUP BY should imply an aggregation of a single group
Submitted: 9 Apr 2016 19:53 Modified: 9 Apr 2016 21:41
Reporter: David Markovitz Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S5 (Performance)
Version:5.0/5.1/5.5/5.6/5.7 OS:Microsoft Windows (Microsoft Windows 7 Enterprise Service Pack 1)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[9 Apr 2016 19:53] David Markovitz
Description:
create table t (i int);
insert into t(i) values (1),(2),(3);

The following query returns 3 rows (single column,null values) instead of 1 (single column,null value):

select null from t having 1=1;

How to repeat:
create table t (i int);

insert into t(i) values (1),(2),(3);

select null from t having 1=1;
[9 Apr 2016 21:41] Miguel Solorzano
Thank you for the bug report. Verified as described.