diff options
Diffstat (limited to 'sql/wsrep_hton.cc')
-rw-r--r-- | sql/wsrep_hton.cc | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index f84aa5b2e84..1feb46ecdaf 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -488,11 +488,27 @@ wsrep_run_wsrep_commit(THD *thd, bool all) if (WSREP_UNDEFINED_TRX_ID == thd->wsrep_ws_handle.trx_id) { - WSREP_WARN("SQL statement was ineffective thd: %lld buf: %zu\n" + /* + Async replication slave may have applied some non-innodb workload, + and then has written replication "meta data" into gtid_slave_pos + innodb table. Writes to gtid_slave_pos must not be replicated, + but this activity has caused that innodb hton is registered for this + transaction, but no wsrep keys have been appended. + We enter in this code path, because IO cache has events for non-innodb + tables. + => we should not treat it an error if trx is not introduced for provider + */ + if (thd->system_thread == SYSTEM_THREAD_SLAVE_SQL) + { + WSREP_DEBUG("skipping wsrep replication for async slave, error not raised"); + DBUG_RETURN(WSREP_TRX_OK); + } + + WSREP_WARN("SQL statement was ineffective thd: %llu buf: %zu\n" "schema: %s \n" "QUERY: %s\n" " => Skipping replication", - (longlong) thd->thread_id, data_len, + (ulonglong) thd->thread_id, data_len, thd->get_db(), thd->query()); rcode = WSREP_TRX_FAIL; } |