From e7310a4a92161a6eabc43be83d089a4bcb69a87f Mon Sep 17 00:00:00 2001 From: liangwenjiao <1757640220@qq.com> Date: Sat, 16 Dec 2023 08:59:14 +0000 Subject: [PATCH 1/2] ref: adapter 8.0.30 Signed-off-by: liangwenjiao <1757640220@qq.com> --- plugin/thread_pool/threadpool_unix.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/plugin/thread_pool/threadpool_unix.cc b/plugin/thread_pool/threadpool_unix.cc index 707fbd54c..3229f943d 100644 --- a/plugin/thread_pool/threadpool_unix.cc +++ b/plugin/thread_pool/threadpool_unix.cc @@ -115,18 +115,26 @@ static void connection_abort(connection_t *connection); static void set_next_timeout_check(ulonglong abstime); static void print_pool_blocked_message(bool) noexcept; +static void tp_lock_plugin_mutex() { + mysql_mutex_lock(&LOCK_plugin); +} + +static void tp_unlock_plugin_mutex() { + mysql_mutex_unlock(&LOCK_plugin); +} + static void tp_inc_ref_count() { - lock_plugin_mutex(); + tp_lock_plugin_mutex(); assert(gPluginPtr != nullptr); gPluginPtr->ref_count++; - unlock_plugin_mutex(); + tp_unlock_plugin_mutex(); } static void tp_dec_ref_count() { - lock_plugin_mutex(); + tp_lock_plugin_mutex(); assert(gPluginPtr != nullptr); gPluginPtr->ref_count--; - unlock_plugin_mutex(); + tp_unlock_plugin_mutex(); } class ThreadPoolConnSet { -- Gitee From 6ff32e58644999beac52c66ad69d76bb3ea4a27b Mon Sep 17 00:00:00 2001 From: liangwenjiao <1757640220@qq.com> Date: Sat, 16 Dec 2023 09:25:23 +0000 Subject: [PATCH 2/2] ref: adapter 8.0.30 Signed-off-by: liangwenjiao <1757640220@qq.com> --- plugin/thread_pool/threadpool_unix.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/thread_pool/threadpool_unix.cc b/plugin/thread_pool/threadpool_unix.cc index 3229f943d..8e608c80f 100644 --- a/plugin/thread_pool/threadpool_unix.cc +++ b/plugin/thread_pool/threadpool_unix.cc @@ -116,11 +116,11 @@ static void set_next_timeout_check(ulonglong abstime); static void print_pool_blocked_message(bool) noexcept; static void tp_lock_plugin_mutex() { - mysql_mutex_lock(&LOCK_plugin); + mysql_mutex_lock(&LOCK_plugin); } static void tp_unlock_plugin_mutex() { - mysql_mutex_unlock(&LOCK_plugin); + mysql_mutex_unlock(&LOCK_plugin); } static void tp_inc_ref_count() { -- Gitee