diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-12-03 14:45:06 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-12-03 14:45:06 +0100 |
commit | f8b5e147da18d0baa7345aed0deec0fd40666d19 (patch) | |
tree | c0b0cbb9bc0f5afd6ca123604a67323bdc521099 /sql/wsrep_hton.cc | |
parent | 543f22a2d0633e645fb49a360c55528d8cb008fb (diff) | |
parent | 117c8146de7ccfaf2331225d6fb264de71aa6779 (diff) | |
download | mariadb-git-f8b5e147da18d0baa7345aed0deec0fd40666d19.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/wsrep_hton.cc')
-rw-r--r-- | sql/wsrep_hton.cc | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index c34e14b7e1f..6cf29c43447 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -479,12 +479,29 @@ 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->db ? thd->db : "(null)"), thd->query()); + rcode = WSREP_TRX_FAIL; } else if (!rcode) |