Skip to content

Commit 9b82681

Browse files
tonychen2001svoj
authored andcommitted
Fix server_audit rwlock PS instrumentation
Commit 1d80e8e updated lock_operations to a rwlock from a mutex but didn't update the PS instrumentation setup accordingly. We update the PS setup accordingly so the lock is correctly instrumented in performance_schema.rwlock_instances. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
1 parent 692f328 commit 9b82681

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugin/server_audit/server_audit.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,8 @@ static struct st_mysql_show_var audit_status[]=
562562
};
563563

564564
#ifdef HAVE_PSI_INTERFACE
565-
static PSI_mutex_key key_LOCK_operations;
566-
static PSI_mutex_info mutex_key_list[]=
565+
static PSI_rwlock_key key_LOCK_operations;
566+
static PSI_rwlock_info rwlock_key_list[]=
567567
{
568568
{ &key_LOCK_operations, "SERVER_AUDIT_plugin::lock_operations",
569569
PSI_FLAG_GLOBAL}
@@ -2662,7 +2662,7 @@ static int server_audit_init(void *p __attribute__((unused)))
26622662
logger_init_mutexes();
26632663
#ifdef HAVE_PSI_INTERFACE
26642664
if (PSI_server)
2665-
PSI_server->register_mutex("server_audit", mutex_key_list, 1);
2665+
PSI_server->register_rwlock("server_audit", rwlock_key_list, 1);
26662666
#endif
26672667
mysql_prlock_init(key_LOCK_operations, &lock_operations);
26682668
flogger_mutex_init(key_LOCK_operations, &lock_atomic, MY_MUTEX_INIT_FAST);

0 commit comments

Comments
 (0)