Commit 3d76af08 authored by Teemu Ollakka's avatar Teemu Ollakka Committed by Jan Lindström

MDEV-22998 Free thd->mem_root at applier commit or rollback.

parent 468e56bf
...@@ -276,6 +276,8 @@ int Wsrep_high_priority_service::append_fragment_and_commit( ...@@ -276,6 +276,8 @@ int Wsrep_high_priority_service::append_fragment_and_commit(
m_thd->wsrep_cs().after_applying(); m_thd->wsrep_cs().after_applying();
m_thd->mdl_context.release_transactional_locks(); 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"); thd_proc_info(m_thd, "wsrep applier committed");
DBUG_RETURN(ret); DBUG_RETURN(ret);
...@@ -334,6 +336,8 @@ int Wsrep_high_priority_service::commit(const wsrep::ws_handle& ws_handle, ...@@ -334,6 +336,8 @@ int Wsrep_high_priority_service::commit(const wsrep::ws_handle& ws_handle,
thd->lex->sql_command= SQLCOM_END; thd->lex->sql_command= SQLCOM_END;
free_root(thd->mem_root, MYF(MY_KEEP_PREALLOC));
must_exit_= check_exit_status(); must_exit_= check_exit_status();
DBUG_RETURN(ret); DBUG_RETURN(ret);
} }
...@@ -346,6 +350,9 @@ int Wsrep_high_priority_service::rollback(const wsrep::ws_handle& ws_handle, ...@@ -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)); int ret= (trans_rollback_stmt(m_thd) || trans_rollback(m_thd));
m_thd->mdl_context.release_transactional_locks(); m_thd->mdl_context.release_transactional_locks();
m_thd->mdl_context.release_explicit_locks(); m_thd->mdl_context.release_explicit_locks();
free_root(m_thd->mem_root, MYF(MY_KEEP_PREALLOC));
DBUG_RETURN(ret); DBUG_RETURN(ret);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment