1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fixed bug #21493: crash for the second execution of a function

containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information 
to restore correctly the having clause for the second execution.
Saved andor structure of the having conditions at the proper moment
before any calls of split_sum_func2 that could modify the having structure
adding new Item_ref objects. (These additions, are produced not with 
the statement mem_root, but rather with the execution mem_root.)
This commit is contained in:
igor@rurik.mysql.com
2006-09-16 09:50:48 -07:00
parent aa7ae80509
commit d3d3cef88c
8 changed files with 158 additions and 11 deletions

View File

@ -606,6 +606,7 @@ err:
bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list,
Item **conds, uint order_num, ORDER *order)
{
Item *fake_conds= 0;
TABLE *table= table_list->table;
TABLE_LIST tables;
List<Item> all_fields;
@ -645,7 +646,7 @@ bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list,
DBUG_RETURN(TRUE);
}
}
select_lex->fix_prepare_information(thd, conds);
select_lex->fix_prepare_information(thd, conds, &fake_conds);
DBUG_RETURN(FALSE);
}