From 2e23c7342ff724b6eb82fd020e0bcdf312ae3209 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Wed, 28 Aug 2024 14:32:37 +1000 Subject: [PATCH] MDEV-34567 unit.my_apc always failing on FreeBSD-14 Without the call to my_mutex_init, the mutex attributes my_fast_mutexattr and my_errorcheck_mutexattr are uninitialized. Linux tolerates this but FreeBSD doesn't (and segfaults). We fix for all since the unit text should be testing the standard mutexes of the system. --- unittest/sql/my_apc-t.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/unittest/sql/my_apc-t.cc b/unittest/sql/my_apc-t.cc index f1a28225f41..8fb9181377a 100644 --- a/unittest/sql/my_apc-t.cc +++ b/unittest/sql/my_apc-t.cc @@ -190,6 +190,7 @@ int main(int args, char **argv) pthread_t request_thr[N_THREADS]; int i; + my_mutex_init(); my_thread_global_init(); mysql_mutex_init(0, &apc_counters_mutex, MY_MUTEX_INIT_FAST);