Commit 3c2e7f1e authored by unknown's avatar unknown
Browse files

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.)


sql/sp_head.cc:
  A minor adjustment of the previous bug fix; moved the rollback of item changes
  to a better place which will not miss some cases.
parent 0fc34660
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -504,6 +504,7 @@ sp_head::execute(THD *thd)
      break;
    DBUG_PRINT("execute", ("Instruction %u", ip));
    ret= i->execute(thd, &ip);
    thd->rollback_item_tree_changes();
    if (i->free_list)
      cleanup_items(i->free_list);
    // 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)
  res= mysql_execute_command(thd);

  lex->unit.cleanup();
  thd->rollback_item_tree_changes();
  if (thd->lock || thd->open_tables || thd->derived_tables)
  {
    thd->proc_info="closing tables";