Commit a2a08eda authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-27943 - reduce calls to mysql_socket_set_thread_owner() in threadpool

It is enough to just once, during connection phase
parent 076df87b
......@@ -199,7 +199,6 @@ static void thread_attach(THD* thd)
DBUG_ASSERT(thd->mysys_var == my_thread_var);
thd->mysys_var->stack_ends_here= thd->thread_stack + tinfo->stack_size;
PSI_CALL_set_thread(thd->get_psi());
mysql_socket_set_thread_owner(thd->net.vio->mysql_socket);
}
/*
......@@ -313,6 +312,7 @@ static THD *threadpool_add_connection(CONNECT *connect, TP_connection *c)
/* Login. */
thread_attach(thd);
mysql_socket_set_thread_owner(thd->net.vio->mysql_socket);
re_init_net_server_extension(thd);
ulonglong now= microsecond_interval_timer();
thd->prior_thr_create_utime= now;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment