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 | 6 |
3 files changed, 30 insertions, 2 deletions
diff --git a/sql/service_wsrep.cc b/sql/service_wsrep.cc index f61db1e80e8..35e455402e1 100644 --- a/sql/service_wsrep.cc +++ b/sql/service_wsrep.cc @@ -372,4 +372,27 @@ 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)); + } }
\ No newline at end of file diff --git a/sql/sql_plugin_services.ic b/sql/sql_plugin_services.ic index e4f9f3c0d13..ca1cbeeeb3a 100644 --- a/sql/sql_plugin_services.ic +++ b/sql/sql_plugin_services.ic @@ -178,7 +178,8 @@ static struct wsrep_service_st wsrep_handler = { wsrep_OSU_method_get, wsrep_thd_has_ignored_error, wsrep_thd_set_ignored_error, - 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 139cd5cd7ae..497f4ddecc7 100644 --- a/sql/wsrep_dummy.cc +++ b/sql/wsrep_dummy.cc @@ -151,4 +151,8 @@ void wsrep_thd_set_ignored_error(THD*, my_bool) ulong wsrep_OSU_method_get(const THD*) { return 0;} bool wsrep_thd_set_wsrep_aborter(THD*, THD*) -{ return 0;}
\ No newline at end of file +{ return 0;} + +void wsrep_report_bf_lock_wait(const THD*, + unsigned long long) +{}
\ No newline at end of file |