Skip to content

Commit 571764c

Browse files
author
Jan Lindström
committed
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.
1 parent 1e08e08 commit 571764c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sql/wsrep_high_priority_service.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,15 @@ int Wsrep_high_priority_service::commit(const wsrep::ws_handle& ws_handle,
301301
DBUG_ASSERT(thd->wsrep_trx().active());
302302
thd->wsrep_cs().prepare_for_ordering(ws_handle, ws_meta, true);
303303
thd_proc_info(thd, "committing");
304+
int ret=0;
304305

305306
const bool is_ordered= !ws_meta.seqno().is_undefined();
306-
int ret= trans_commit(thd);
307+
308+
if (!thd->transaction.stmt.is_empty())
309+
ret= trans_commit_stmt(thd);
310+
311+
if (ret == 0)
312+
ret= trans_commit(thd);
307313

308314
if (ret == 0)
309315
{

0 commit comments

Comments
 (0)