summaryrefslogtreecommitdiff
path: root/sql/mdl.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2021-09-05 20:22:39 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2021-09-05 20:22:39 +0200
commit12c3d1e1d7eee013f2f2ee75965803822a95d43e (patch)
treed1c500b4018cd1d8c45ddb2f0f97231c6a2aa276 /sql/mdl.cc
parentae85835cc7fa88bb80a282106c1e905d85157923 (diff)
downloadmariadb-git-12c3d1e1d7eee013f2f2ee75965803822a95d43e.tar.gz
Fix Windows warnings and tests for -DPLUGIN_PERFSCHEMA=NO
Diffstat (limited to 'sql/mdl.cc')
-rw-r--r--sql/mdl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc
index 67ebc70d860..dc1d658b0b5 100644
--- a/sql/mdl.cc
+++ b/sql/mdl.cc
@@ -2336,11 +2336,13 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
mysql_prlock_unlock(&lock->m_rwlock);
+#ifdef HAVE_PSI_INTERFACE
PSI_metadata_locker_state state __attribute__((unused));
PSI_metadata_locker *locker= NULL;
if (ticket->m_psi != NULL)
locker= PSI_CALL_start_metadata_wait(&state, ticket->m_psi, __FILE__, __LINE__);
+#endif
will_wait_for(ticket);
@@ -2387,8 +2389,10 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
done_waiting_for();
+#ifdef HAVE_PSI_INTERFACE
if (locker != NULL)
PSI_CALL_end_metadata_wait(locker, 0);
+#endif
if (wait_status != MDL_wait::GRANTED)
{