mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Fixed bug in HAVING when refering to RAND() through alias
(BUG 8216)
This commit is contained in:
@@ -1758,9 +1758,12 @@ String *Item_func_elt::val_str(String *str)
|
||||
void Item_func_make_set::split_sum_func(THD *thd, Item **ref_pointer_array,
|
||||
List<Item> &fields)
|
||||
{
|
||||
if (item->with_sum_func && item->type() != SUM_FUNC_ITEM)
|
||||
if (item->type() != SUM_FUNC_ITEM &&
|
||||
(item->with_sum_func ||
|
||||
(item->used_tables() & PSEUDO_TABLE_BITS)))
|
||||
item->split_sum_func(thd, ref_pointer_array, fields);
|
||||
else if (item->used_tables() || item->type() == SUM_FUNC_ITEM)
|
||||
else if (item->type() == SUM_FUNC_ITEM ||
|
||||
(item->used_tables() && item->type() != REF_ITEM))
|
||||
{
|
||||
uint el= fields.elements;
|
||||
ref_pointer_array[el]=item;
|
||||
|
Reference in New Issue
Block a user