From 9c2b6786870a994d57fb9add969dfc7589f62c15 Mon Sep 17 00:00:00 2001 From: Kaige Ye Date: Fri, 23 Jul 2021 16:09:00 +0800 Subject: [PATCH] fix buf_resize_thread missing in performance_schema.threads --- storage/innobase/buf/buf0buf.cc | 4 ++++ storage/innobase/handler/ha_innodb.cc | 1 + storage/innobase/include/srv0srv.h | 1 + storage/innobase/srv/srv0start.cc | 1 + 4 files changed, 7 insertions(+) diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index d250140a85d4..f0220dcb4a23 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -3018,6 +3018,10 @@ DECLARE_THREAD(buf_resize_thread)( { my_thread_init(); +#ifdef UNIV_PFS_THREAD + pfs_register_thread(buf_resize_thread_key); +#endif /* UNIV_PFS_THREAD */ + srv_buf_resize_thread_active = true; while (srv_shutdown_state == SRV_SHUTDOWN_NONE) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 413d2e21baab..d3277674538b 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -503,6 +503,7 @@ static PSI_thread_info all_innodb_threads[] = { PSI_KEY(srv_purge_thread), PSI_KEY(srv_worker_thread), PSI_KEY(trx_rollback_clean_thread), + PSI_KEY(buf_resize_thread), }; # endif /* UNIV_PFS_THREAD */ diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 3bf9eb93131a..6d78745259ba 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -490,6 +490,7 @@ extern mysql_pfs_key_t srv_monitor_thread_key; extern mysql_pfs_key_t srv_purge_thread_key; extern mysql_pfs_key_t srv_worker_thread_key; extern mysql_pfs_key_t trx_rollback_clean_thread_key; +extern mysql_pfs_key_t buf_resize_thread_key; /* This macro register the current thread and its key with performance schema */ diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index b404b2068357..12a1d44daa32 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -198,6 +198,7 @@ mysql_pfs_key_t srv_master_thread_key; mysql_pfs_key_t srv_monitor_thread_key; mysql_pfs_key_t srv_purge_thread_key; mysql_pfs_key_t srv_worker_thread_key; +mysql_pfs_key_t buf_resize_thread_key; #endif /* UNIV_PFS_THREAD */ #ifdef HAVE_PSI_STAGE_INTERFACE