Skip to content

Commit a2a08ed

Browse files
committed
MDEV-27943 - reduce calls to mysql_socket_set_thread_owner() in threadpool
It is enough to just once, during connection phase
1 parent 076df87 commit a2a08ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/threadpool_common.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ static void thread_attach(THD* thd)
199199
DBUG_ASSERT(thd->mysys_var == my_thread_var);
200200
thd->mysys_var->stack_ends_here= thd->thread_stack + tinfo->stack_size;
201201
PSI_CALL_set_thread(thd->get_psi());
202-
mysql_socket_set_thread_owner(thd->net.vio->mysql_socket);
203202
}
204203

205204
/*
@@ -313,6 +312,7 @@ static THD *threadpool_add_connection(CONNECT *connect, TP_connection *c)
313312

314313
/* Login. */
315314
thread_attach(thd);
315+
mysql_socket_set_thread_owner(thd->net.vio->mysql_socket);
316316
re_init_net_server_extension(thd);
317317
ulonglong now= microsecond_interval_timer();
318318
thd->prior_thr_create_utime= now;

0 commit comments

Comments
 (0)