galera fix: Assertion WSREP(thd) failed in wsrep_restore_kill_after_commit()

Wsrep_commit_empty happens too early when wsrep is disabled. Let the
cleanup happen at end of statement.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This commit is contained in:
Daniele Sciascia 2023-12-05 01:40:57 +01:00 committed by Julius Goryavsky
parent 50d49493db
commit 0018df2b55

View File

@ -1660,7 +1660,7 @@ int ha_commit_trans(THD *thd, bool all)
thd->m_transaction_psi= NULL;
}
#ifdef WITH_WSREP
if (wsrep_is_active(thd) && is_real_trans && !error)
if (WSREP(thd) && wsrep_is_active(thd) && is_real_trans && !error)
wsrep_commit_empty(thd, all);
#endif /* WITH_WSREP */