2011-01-17 11:49:54.958975+00:00
https://api.launchpad.net/1.0/bugs/702345
https://api.launchpad.net/1.0/~timour
https://api.launchpad.net/1.0/maria/+milestone/5.3
https://api.launchpad.net/1.0/bugs/702345/linked_branches
https://api.launchpad.net/1.0/bugs/702345/activity
https://bugs.launchpad.net/bugs/702345
Timour Katchaounov
Timour Katchaounov
Maria 5.3
Empty query with SUM and HAVING, no GROUP BY returns NULL instead of empty result.
Fix Released
High
2011-01-13 13:24:29.952448+00:00
bug
Timour Katchaounov
added bug
maria: milestone
Timour Katchaounov
maria: assignee
Timour Katchaounov
maria: importance
Timour Katchaounov
maria: status
Timour Katchaounov
branch linked
Timour Katchaounov
maria: status
Timour Katchaounov
maria: status
Timour Katchaounov
Timour Katchaounov
Timour Katchaounov
Timour Katchaounov
val_int() == 0)
send_row=0;
However having has been already set to NULL, so return_zero_rows
doesn't check the having clause, hence the wrong result.
Solution:
There are two ways to solve this problem:
a) check join->tmp_having in addition to join->having, or
b) do not set having= 0 in JOIN::optimize.
]]>
lp:~maria-captains/maria/5.3-mwl89