diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-08-26 13:32:15 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-08-26 13:34:51 +0300 |
commit | 571764c04fc9b736366959b2c0e00d9bd0eb5a4e (patch) | |
tree | c3d33e8676cdb000a960ea474807133960f93f62 | |
parent | 1e08e08ccb8896c1f0d2f673c16f5b92cdf7dc46 (diff) | |
download | mariadb-git-571764c04fc9b736366959b2c0e00d9bd0eb5a4e.tar.gz |
MDEV-23584 : Galera assertion failure "thd->transaction.stmt.is_empty() at transaction.cc:69bb-10.4-MDEV-21578
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.
-rw-r--r-- | sql/wsrep_high_priority_service.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/wsrep_high_priority_service.cc b/sql/wsrep_high_priority_service.cc index ec195bb57cf..0aeedbd7516 100644 --- a/sql/wsrep_high_priority_service.cc +++ b/sql/wsrep_high_priority_service.cc @@ -301,9 +301,15 @@ int Wsrep_high_priority_service::commit(const wsrep::ws_handle& ws_handle, DBUG_ASSERT(thd->wsrep_trx().active()); thd->wsrep_cs().prepare_for_ordering(ws_handle, ws_meta, true); thd_proc_info(thd, "committing"); + int ret=0; 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) { |