diff --git a/sql/handler.cc b/sql/handler.cc index 7e30968cb1d..22bc363e88c 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -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 */