From 231c02f7b9fc05ffa07dacd5f31bbd2ff14e7cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 24 Apr 2018 13:58:42 +0300 Subject: MariaDB adjustments. --- sql/wsrep_hton.cc | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'sql/wsrep_hton.cc') diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index c18c179a4bd..1676daab5fe 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -103,10 +103,10 @@ void wsrep_post_commit(THD* thd, bool all) switch (thd->wsrep_exec_mode) { - case LOCAL_COMMIT: + case LOCAL_COMMIT: { DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno != WSREP_SEQNO_UNDEFINED); - if (wsrep->post_commit(wsrep, &thd->wsrep_ws_handle)) + if (wsrep && wsrep->post_commit(wsrep, &thd->wsrep_ws_handle)) { DBUG_PRINT("wsrep", ("set committed fail")); WSREP_WARN("set committed fail: %llu %d", @@ -115,29 +115,29 @@ void wsrep_post_commit(THD* thd, bool all) wsrep_cleanup_transaction(thd); break; } - case LOCAL_STATE: - { - /* non-InnoDB statements may have populated events in stmt cache - => cleanup - */ - WSREP_DEBUG("cleanup transaction for LOCAL_STATE"); - /* - Run post-rollback hook to clean up in the case if - some keys were populated for the transaction in provider - but during commit time there was no write set to replicate. - This may happen when client sets the SAVEPOINT and immediately - rolls back to savepoint after first operation. + case LOCAL_STATE: + { + /* non-InnoDB statements may have populated events in stmt cache + => cleanup + */ + WSREP_DEBUG("cleanup transaction for LOCAL_STATE"); + /* + Run post-rollback hook to clean up in the case if + some keys were populated for the transaction in provider + but during commit time there was no write set to replicate. + This may happen when client sets the SAVEPOINT and immediately + rolls back to savepoint after first operation. */ - if (all && thd->wsrep_conflict_state != MUST_REPLAY && - wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle)) - { - WSREP_WARN("post_rollback fail: %llu %d", - (long long)thd->thread_id, thd->stmt_da->status()); - } - wsrep_cleanup_transaction(thd); - break; - } - default: break; + if (all && thd->wsrep_conflict_state != MUST_REPLAY && + wsrep && wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle)) + { + WSREP_WARN("post_rollback fail: %llu %d", + (long long)thd->thread_id, thd->stmt_da->status()); + } + wsrep_cleanup_transaction(thd); + break; + } + default: break; } } -- cgit v1.2.1