summaryrefslogtreecommitdiff
path: root/storage/innobase/sync/sync0arr.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/sync/sync0arr.c')
-rw-r--r--storage/innobase/sync/sync0arr.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/storage/innobase/sync/sync0arr.c b/storage/innobase/sync/sync0arr.c
index ed9e25bf2f2..248bd2cd25d 100644
--- a/storage/innobase/sync/sync0arr.c
+++ b/storage/innobase/sync/sync0arr.c
@@ -138,6 +138,11 @@ struct sync_array_struct {
since creation of the array */
};
+#ifdef UNIV_PFS_MUTEX
+/* Key to register the mutex with performance schema */
+UNIV_INTERN mysql_pfs_key_t syn_arr_mutex_key;
+#endif
+
#ifdef UNIV_SYNC_DEBUG
/******************************************************************//**
This function is called only in the debug version. Detects a deadlock
@@ -247,7 +252,8 @@ sync_array_create(
if (protection == SYNC_ARRAY_OS_MUTEX) {
arr->os_mutex = os_mutex_create(NULL);
} else if (protection == SYNC_ARRAY_MUTEX) {
- mutex_create(&arr->mutex, SYNC_NO_ORDER_CHECK);
+ mutex_create(syn_arr_mutex_key,
+ &arr->mutex, SYNC_NO_ORDER_CHECK);
} else {
ut_error;
}
@@ -498,7 +504,9 @@ sync_array_cell_print(
|| type == RW_LOCK_WAIT_EX
|| type == RW_LOCK_SHARED) {
- fputs(type == RW_LOCK_EX ? "X-lock on" : "S-lock on", file);
+ fputs(type == RW_LOCK_EX ? "X-lock on"
+ : type == RW_LOCK_WAIT_EX ? "X-lock (wait_ex) on"
+ : "S-lock on", file);
rwlock = cell->old_wait_rw_lock;