mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
5.3->5.5 merge
This commit is contained in:
@ -2505,14 +2505,24 @@ void reinit_stmt_before_use(THD *thd, LEX *lex)
|
||||
*/
|
||||
if (sl->prep_where)
|
||||
{
|
||||
sl->where= sl->prep_where->copy_andor_structure(thd);
|
||||
/*
|
||||
We need this rollback because memory allocated in
|
||||
copy_andor_structure() will be freed
|
||||
*/
|
||||
thd->change_item_tree((Item**)&sl->where,
|
||||
sl->prep_where->copy_andor_structure(thd));
|
||||
sl->where->cleanup();
|
||||
}
|
||||
else
|
||||
sl->where= NULL;
|
||||
if (sl->prep_having)
|
||||
{
|
||||
sl->having= sl->prep_having->copy_andor_structure(thd);
|
||||
/*
|
||||
We need this rollback because memory allocated in
|
||||
copy_andor_structure() will be freed
|
||||
*/
|
||||
thd->change_item_tree((Item**)&sl->having,
|
||||
sl->prep_having->copy_andor_structure(thd));
|
||||
sl->having->cleanup();
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user