Commit d88fa42c authored by pem@mysql.comhem.se's avatar pem@mysql.comhem.se

A minor adjustment of the previous bug fix in sp_head.cc.

(Which btw also fixed BUG#7295: Server crash when executing stored procedure,
 I just forgot to include that before.)
parent fcb13556
...@@ -504,6 +504,7 @@ sp_head::execute(THD *thd) ...@@ -504,6 +504,7 @@ sp_head::execute(THD *thd)
break; break;
DBUG_PRINT("execute", ("Instruction %u", ip)); DBUG_PRINT("execute", ("Instruction %u", ip));
ret= i->execute(thd, &ip); ret= i->execute(thd, &ip);
thd->rollback_item_tree_changes();
if (i->free_list) if (i->free_list)
cleanup_items(i->free_list); cleanup_items(i->free_list);
// Check if an exception has occurred and a handler has been found // Check if an exception has occurred and a handler has been found
...@@ -1195,7 +1196,6 @@ sp_instr_stmt::exec_stmt(THD *thd, LEX *lex) ...@@ -1195,7 +1196,6 @@ sp_instr_stmt::exec_stmt(THD *thd, LEX *lex)
res= mysql_execute_command(thd); res= mysql_execute_command(thd);
lex->unit.cleanup(); lex->unit.cleanup();
thd->rollback_item_tree_changes();
if (thd->lock || thd->open_tables || thd->derived_tables) if (thd->lock || thd->open_tables || thd->derived_tables)
{ {
thd->proc_info="closing tables"; thd->proc_info="closing tables";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment