diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index e526be7c55c..0c7bafb39e2 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -312,7 +312,8 @@ static PSI_thread_info all_innodb_threads[] = { {&srv_lock_timeout_thread_key, "srv_lock_timeout_thread", 0}, {&srv_error_monitor_thread_key, "srv_error_monitor_thread", 0}, {&srv_monitor_thread_key, "srv_monitor_thread", 0}, - {&srv_master_thread_key, "srv_master_thread", 0} + {&srv_master_thread_key, "srv_master_thread", 0}, + {&srv_purge_thread_key, "srv_purge_thread", 0} }; # endif /* UNIV_PFS_THREAD */ diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 2cec4b919fb..e81c7066e4b 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -328,6 +328,7 @@ extern mysql_pfs_key_t srv_lock_timeout_thread_key; extern mysql_pfs_key_t srv_error_monitor_thread_key; extern mysql_pfs_key_t srv_monitor_thread_key; extern mysql_pfs_key_t srv_master_thread_key; +extern mysql_pfs_key_t srv_purge_thread_key; /* This macro register the current thread and its key with performance schema */ diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index 560dafa6138..876bce70b40 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -2965,6 +2965,10 @@ srv_purge_thread( ut_a(srv_n_purge_threads == 1); +#ifdef UNIV_PFS_THREAD + pfs_register_thread(srv_purge_thread_key); +#endif /* UNIV_PFS_THREAD */ + #ifdef UNIV_DEBUG_THREAD_CREATION fprintf(stderr, "InnoDB: Purge thread running, id %lu\n", os_thread_pf(os_thread_get_curr_id())); diff --git a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c index 4c9851e953b..c8512fc27a4 100644 --- a/storage/innobase/srv/srv0start.c +++ b/storage/innobase/srv/srv0start.c @@ -149,6 +149,7 @@ UNIV_INTERN mysql_pfs_key_t srv_lock_timeout_thread_key; UNIV_INTERN mysql_pfs_key_t srv_error_monitor_thread_key; UNIV_INTERN mysql_pfs_key_t srv_monitor_thread_key; UNIV_INTERN mysql_pfs_key_t srv_master_thread_key; +UNIV_INTERN mysql_pfs_key_t srv_purge_thread_key; #endif /* UNIV_PFS_THREAD */ #ifdef UNIV_PFS_MUTEX