From b975697da11ed62cbce7e528e3661e5e4ac1d81e Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Tue, 30 Jun 2026 13:15:15 +1000 Subject: [PATCH] MDEV-40103 Initialise thd->net in spider_create_sys_thd net is used by THD::print_aborted_warning when threads are killed so this needed to be initalised. This fixes an msan "uninitialized value" bug --- storage/spider/spd_table.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 2aaab524c6542..4f1a743f5fd4b 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -78,6 +78,11 @@ inline MYSQL_THD spider_create_sys_thd(SPIDER_THREAD *thread) THD *thd = create_thd(); if (thd) { + if (my_net_init(&thd->net, NULL, thd, MYF(0))) + { + destroy_thd(thd); + return NULL; + } SPIDER_set_next_thread_id(thd); thd->mysys_var->current_cond = &thread->cond; thd->mysys_var->current_mutex = &thread->mutex;