Empty query with SUM and HAVING, no GROUP BY returns NULL instead of empty result.
Bug #702345 reported by
Timour Katchaounov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
High
|
Timour Katchaounov |
Bug Description
The following test case (for LP BUG#609121) extracted from subselect_mat.test:
create table t1 (c1 int);
create table t2 (c2 int);
insert into t1 values (1);
insert into t2 values (2);
SELECT SUM(c1) c1_sum FROM t1 WHERE c1 IN (SELECT c2 FROM t2) HAVING c1_sum;
incorrectly produces a NULL instead of an empty result.
Related branches
lp:~maria-captains/maria/5.3-mwl89
(Merged)
Changed in maria: | |
milestone: | none → 5.3 |
assignee: | nobody → Timour Katchaounov (timour) |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in maria: | |
status: | Confirmed → In Progress |
Changed in maria: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
The bug is present both with MATERIALIZATION and with IN-TO-EXISTS, switch= 'materializatio n=on,in_ to_exists= on,semijoin= off'; switch= 'materializatio n=off,in_ to_exists= on,semijoin= off'; switch= 'materializatio n=on,in_ to_exists= off,semijoin= off';
but not with SEMIJOIN:
set @@optimizer_
set @@optimizer_
set @@optimizer_