summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
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
commit844797c492312a5b0851a6cce3a84994aa4250a0 (patch)
tree8d6c2db966d4879ac8258d645eacc8e425ae1166 /sql/sql_select.h
parent9ad8d644392bc9ca23e0212e18c704f7a6520837 (diff)
downloadmariadb-git-844797c492312a5b0851a6cce3a84994aa4250a0.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 mysql-test/r/group_by.result: BUG#38072: Wrong result: HAVING not observed in a query with aggregate - Testcase mysql-test/t/group_by.test: BUG#38072: Wrong result: HAVING not observed in a query with aggregate - Testcase sql/sql_select.h: 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
Diffstat (limited to 'sql/sql_select.h')
-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