diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/service_wsrep.cc | 23 | ||||
-rw-r--r-- | sql/sql_plugin_services.ic | 3 | ||||
-rw-r--r-- | sql/wsrep_dummy.cc | 4 |
3 files changed, 29 insertions, 1 deletions
diff --git a/sql/service_wsrep.cc b/sql/service_wsrep.cc index 889f3630cc3..4fc927cfd86 100644 --- a/sql/service_wsrep.cc +++ b/sql/service_wsrep.cc @@ -337,3 +337,26 @@ extern "C" bool wsrep_thd_set_wsrep_aborter(THD *bf_thd, THD *victim_thd) victim_thd->wsrep_aborter = bf_thd->thread_id; return false; } + +extern "C" void wsrep_report_bf_lock_wait(const THD *thd, + unsigned long long trx_id) +{ + if (thd) + { + WSREP_ERROR("Thread %s trx_id: %llu thread: %ld " + "seqno: %lld client_state: %s client_mode: %s transaction_mode: %s " + "applier: %d toi: %d local: %d " + "query: %s", + wsrep_thd_is_BF(thd, false) ? "BF" : "normal", + trx_id, + thd_get_thread_id(thd), + wsrep_thd_trx_seqno(thd), + wsrep_thd_client_state_str(thd), + wsrep_thd_client_mode_str(thd), + wsrep_thd_transaction_state_str(thd), + wsrep_thd_is_applying(thd), + wsrep_thd_is_toi(thd), + wsrep_thd_is_local(thd), + wsrep_thd_query(thd)); + } +} diff --git a/sql/sql_plugin_services.ic b/sql/sql_plugin_services.ic index 42fc0600807..69e57de5c8b 100644 --- a/sql/sql_plugin_services.ic +++ b/sql/sql_plugin_services.ic @@ -174,7 +174,8 @@ static struct wsrep_service_st wsrep_handler = { wsrep_get_debug, wsrep_commit_ordered, wsrep_thd_is_applying, - wsrep_thd_set_wsrep_aborter + wsrep_thd_set_wsrep_aborter, + wsrep_report_bf_lock_wait }; static struct thd_specifics_service_st thd_specifics_handler= diff --git a/sql/wsrep_dummy.cc b/sql/wsrep_dummy.cc index 11fd90091f6..c4dbd8c450f 100644 --- a/sql/wsrep_dummy.cc +++ b/sql/wsrep_dummy.cc @@ -145,3 +145,7 @@ my_bool wsrep_thd_is_applying(const THD*) bool wsrep_thd_set_wsrep_aborter(THD*, THD*) { return 0;} + +void wsrep_report_bf_lock_wait(const THD*, + unsigned long long) +{} |