mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Fixed LP bug #609121
Post-review fix - avoid re-evaluation of the having clause when it evaluates to true.
This commit is contained in:
parent
a09e5f504a
commit
3b11e4f834
2 changed files with 7 additions and 5 deletions
|
@ -12652,9 +12652,12 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
|
|||
}
|
||||
else if (join->send_row_on_empty_set())
|
||||
{
|
||||
List<Item> *columns_list= (procedure ? &join->procedure_fields_list :
|
||||
fields);
|
||||
rc= join->result->send_data(*columns_list);
|
||||
if (!join->having || join->having->val_int())
|
||||
{
|
||||
List<Item> *columns_list= (procedure ? &join->procedure_fields_list :
|
||||
fields);
|
||||
rc= join->result->send_data(*columns_list);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1722,8 +1722,7 @@ public:
|
|||
bool send_row_on_empty_set()
|
||||
{
|
||||
return (do_send_rows && tmp_table_param.sum_func_count != 0 &&
|
||||
!group_list && having_value != Item::COND_FALSE &&
|
||||
(!having || having->val_int()));
|
||||
!group_list && having_value != Item::COND_FALSE);
|
||||
}
|
||||
bool change_result(select_result *result);
|
||||
bool is_top_level_join() const
|
||||
|
|
Loading…
Reference in a new issue