From f60a8a680e717a53d78e873f29f7d70f8e60635e Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Thu, 9 Jan 2025 17:27:29 +1100 Subject: [PATCH] MDEV-35554 runtime error: call to function show_cached_thread_count() through pointer to incorrect function type. The argument is void* rather than char* and was missing system_status_var * as an argument. This shows up with UBSAN testing under clang. Reviewer: Brandon Nesterenko --- sql/mysqld.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index c48f94e6601..c798956910f 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7363,8 +7363,8 @@ static int show_threadpool_threads(THD *, SHOW_VAR *var, void *buff, #endif -static int show_cached_thread_count(THD *thd, SHOW_VAR *var, char *buff, - enum enum_var_type scope) +static int show_cached_thread_count(THD *thd, SHOW_VAR *var, void *buff, + system_status_var *, enum enum_var_type scope) { var->type= SHOW_LONG; var->value= buff;