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.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 525d836b8c3..57ab31d9edf 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -3379,8 +3379,13 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
It's reset further in the common code part.
It's merged with the saved parent's value at the exit of this func.
*/
- bool parent_modified_non_trans_table= thd->transaction.stmt.modified_non_trans_table;
+ bool parent_modified_non_trans_table=
+ thd->transaction.stmt.modified_non_trans_table;
+ unsigned int parent_unsafe_rollback_flags=
+ thd->transaction.stmt.m_unsafe_rollback_flags;
thd->transaction.stmt.modified_non_trans_table= FALSE;
+ thd->transaction.stmt.m_unsafe_rollback_flags= 0;
+
DBUG_ASSERT(!thd->derived_tables);
DBUG_ASSERT(thd->Item_change_list::is_empty());
/*
@@ -3496,6 +3501,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
what is needed from the substatement gained
*/
thd->transaction.stmt.modified_non_trans_table |= parent_modified_non_trans_table;
+ thd->transaction.stmt.m_unsafe_rollback_flags |= parent_unsafe_rollback_flags;
TRANSACT_TRACKER(add_trx_state_from_thd(thd));