summaryrefslogtreecommitdiff
path: root/sql/mdl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/mdl.cc')
-rw-r--r--sql/mdl.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc
index bd5d6aa7db3..c2475bb3b91 100644
--- a/sql/mdl.cc
+++ b/sql/mdl.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2007, 2012, Oracle and/or its affiliates.
- Copyright (c) 2020, MariaDB
+ Copyright (c) 2020, 2021, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -2304,6 +2304,20 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
DBUG_RETURN(TRUE);
}
+#ifdef WITH_WSREP
+ if (WSREP(get_thd()))
+ {
+ THD* requester= get_thd();
+ bool requester_toi= wsrep_thd_is_toi(requester) || wsrep_thd_is_applying(requester);
+ WSREP_DEBUG("::acquire_lock is TOI %d for %s", requester_toi,
+ wsrep_thd_query(requester));
+ if (requester_toi)
+ THD_STAGE_INFO(requester, stage_waiting_ddl);
+ else
+ THD_STAGE_INFO(requester, stage_waiting_isolation);
+ }
+#endif /* WITH_WSREP */
+
lock->m_waiting.add_ticket(ticket);
/*