summaryrefslogtreecommitdiffstats
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 5fd6ab52..58235055 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -1575,7 +1575,7 @@ sp_head::execute(THD *thd, bool merge_da_on_success)
{
// Don't count a call ended with an error as normal run
executed_counter= 0;
- main_mem_root.read_only= 0;
+ main_mem_root.flags &= ~ROOT_FLAG_READ_ONLY;
reset_instrs_executed_counter();
}
#endif
@@ -1696,10 +1696,10 @@ sp_head::execute(THD *thd, bool merge_da_on_success)
#ifdef PROTECT_STATEMENT_MEMROOT
if (!err_status)
{
- if (!main_mem_root.read_only &&
+ if (!(main_mem_root.flags & ROOT_FLAG_READ_ONLY) &&
has_all_instrs_executed())
{
- main_mem_root.read_only= 1;
+ main_mem_root.flags |= ROOT_FLAG_READ_ONLY;
}
++executed_counter;
DBUG_PRINT("info", ("execute counter: %lu", executed_counter));