Commit 571764c0 authored by Jan Lindström's avatar Jan Lindström

MDEV-23584 : Galera assertion failure "thd->transaction.stmt.is_empty() at transaction.cc:69

If statement still contains changes it must be committed
before actual transaction is committed.

This assertion was found using randgen and happens only on
applier. No repeatable test case found.
parent 1e08e08c
...@@ -301,9 +301,15 @@ int Wsrep_high_priority_service::commit(const wsrep::ws_handle& ws_handle, ...@@ -301,9 +301,15 @@ int Wsrep_high_priority_service::commit(const wsrep::ws_handle& ws_handle,
DBUG_ASSERT(thd->wsrep_trx().active()); DBUG_ASSERT(thd->wsrep_trx().active());
thd->wsrep_cs().prepare_for_ordering(ws_handle, ws_meta, true); thd->wsrep_cs().prepare_for_ordering(ws_handle, ws_meta, true);
thd_proc_info(thd, "committing"); thd_proc_info(thd, "committing");
int ret=0;
const bool is_ordered= !ws_meta.seqno().is_undefined(); const bool is_ordered= !ws_meta.seqno().is_undefined();
int ret= trans_commit(thd);
if (!thd->transaction.stmt.is_empty())
ret= trans_commit_stmt(thd);
if (ret == 0)
ret= trans_commit(thd);
if (ret == 0) if (ret == 0)
{ {
......
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