summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index b3c35ad5022..88460337526 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -1091,7 +1091,6 @@ sp_head::execute(THD *thd)
thd->net.no_send_error= 0;
if (i->free_list)
cleanup_items(i->free_list);
- i->state= Query_arena::EXECUTED;
/*
If we've set thd->user_var_events_alloc to mem_root of this SP
@@ -2252,6 +2251,9 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
m_lex->mark_as_requiring_prelocking(NULL);
}
thd->rollback_item_tree_changes();
+ /* Update the state of the active arena. */
+ thd->stmt_arena->state= Query_arena::EXECUTED;
+
/*
Unlike for PS we should not call Item's destructors for newly created