summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergey Petrunia <sergefp@mysql.com>2008-10-24 06:16:22 +0400
committerSergey Petrunia <sergefp@mysql.com>2008-10-24 06:16:22 +0400
commit5249c0493ee8c7d164a7608f5888f02c629276d2 (patch)
tree8d6c2db966d4879ac8258d645eacc8e425ae1166 /sql
parentca53651d400f06515032d95b23f9909d94284113 (diff)
downloadmariadb-git-5249c0493ee8c7d164a7608f5888f02c629276d2.tar.gz
BUG#38072: Wrong result: HAVING not observed in a query with aggregate
- Make send_row_on_empty_set() return FALSE when simplify_cond() has found out that HAVING is always FALSE re-committing to put the fix into 5.0 and 5.1
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 42be8d3ec68..c2f0780f5be 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -464,7 +464,7 @@ public:
bool send_row_on_empty_set()
{
return (do_send_rows && tmp_table_param.sum_func_count != 0 &&
- !group_list);
+ !group_list && having_value != Item::COND_FALSE);
}
bool change_result(select_result *result);
bool is_top_level_join() const