diff --git a/sql/wsrep_high_priority_service.cc b/sql/wsrep_high_priority_service.cc index 9f6cbf30e68..ec195bb57cf 100644 --- a/sql/wsrep_high_priority_service.cc +++ b/sql/wsrep_high_priority_service.cc @@ -276,6 +276,8 @@ int Wsrep_high_priority_service::append_fragment_and_commit( m_thd->wsrep_cs().after_applying(); m_thd->mdl_context.release_transactional_locks(); + free_root(m_thd->mem_root, MYF(MY_KEEP_PREALLOC)); + thd_proc_info(m_thd, "wsrep applier committed"); DBUG_RETURN(ret); @@ -334,6 +336,8 @@ int Wsrep_high_priority_service::commit(const wsrep::ws_handle& ws_handle, thd->lex->sql_command= SQLCOM_END; + free_root(thd->mem_root, MYF(MY_KEEP_PREALLOC)); + must_exit_= check_exit_status(); DBUG_RETURN(ret); } @@ -346,6 +350,9 @@ int Wsrep_high_priority_service::rollback(const wsrep::ws_handle& ws_handle, int ret= (trans_rollback_stmt(m_thd) || trans_rollback(m_thd)); m_thd->mdl_context.release_transactional_locks(); m_thd->mdl_context.release_explicit_locks(); + + free_root(m_thd->mem_root, MYF(MY_KEEP_PREALLOC)); + DBUG_RETURN(ret); }