summaryrefslogtreecommitdiff
path: root/sql/wsrep_hton.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/wsrep_hton.cc')
-rw-r--r--sql/wsrep_hton.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc
index 03bf072edcc..c096d2610eb 100644
--- a/sql/wsrep_hton.cc
+++ b/sql/wsrep_hton.cc
@@ -239,8 +239,9 @@ static int wsrep_rollback(handlerton *hton, THD *thd, bool all)
if (WSREP(thd) && wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle))
{
DBUG_PRINT("wsrep", ("setting rollback fail"));
- WSREP_ERROR("settting rollback fail: thd: %llu SQL: %s",
- (long long)thd->real_id, thd->query());
+ WSREP_ERROR("settting rollback fail: thd: %llu, schema: %s, SQL: %s",
+ (long long)thd->real_id, (thd->db ? thd->db : "(null)"),
+ thd->query());
}
wsrep_cleanup_transaction(thd);
}
@@ -279,8 +280,9 @@ int wsrep_commit(handlerton *hton, THD *thd, bool all)
if (WSREP(thd) && wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle))
{
DBUG_PRINT("wsrep", ("setting rollback fail"));
- WSREP_ERROR("settting rollback fail: thd: %llu SQL: %s",
- (long long)thd->real_id, thd->query());
+ WSREP_ERROR("settting rollback fail: thd: %llu, schema: %s, SQL: %s",
+ (long long)thd->real_id, (thd->db ? thd->db : "(null)"),
+ thd->query());
}
wsrep_cleanup_transaction(thd);
}
@@ -441,9 +443,11 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all)
if (WSREP_UNDEFINED_TRX_ID == thd->wsrep_ws_handle.trx_id)
{
WSREP_WARN("SQL statement was ineffective, THD: %lu, buf: %zu\n"
+ "schema: %s \n"
"QUERY: %s\n"
" => Skipping replication",
- thd->thread_id, data_len, thd->query());
+ thd->thread_id, data_len,
+ (thd->db ? thd->db : "(null)"), thd->query());
rcode = WSREP_TRX_FAIL;
}
else if (!rcode)
@@ -458,8 +462,8 @@ wsrep_run_wsrep_commit(THD *thd, handlerton *hton, bool all)
&thd->wsrep_trx_meta);
if (rcode == WSREP_TRX_MISSING) {
- WSREP_WARN("Transaction missing in provider, thd: %ld, SQL: %s",
- thd->thread_id, thd->query());
+ WSREP_WARN("Transaction missing in provider, thd: %ld, schema: %s, SQL: %s",
+ thd->thread_id, (thd->db ? thd->db : "(null)"), thd->query());
rcode = WSREP_TRX_FAIL;
} else if (rcode == WSREP_BF_ABORT) {
WSREP_DEBUG("thd %lu seqno %lld BF aborted by provider, will replay",