MDEV-27943 - reduce calls to mysql_socket_set_thread_owner() in threadpool
It is enough to just once, during connection phase
This commit is contained in:
parent
076df87b4c
commit
a2a08eda8a
@ -199,7 +199,6 @@ static void thread_attach(THD* thd)
|
|||||||
DBUG_ASSERT(thd->mysys_var == my_thread_var);
|
DBUG_ASSERT(thd->mysys_var == my_thread_var);
|
||||||
thd->mysys_var->stack_ends_here= thd->thread_stack + tinfo->stack_size;
|
thd->mysys_var->stack_ends_here= thd->thread_stack + tinfo->stack_size;
|
||||||
PSI_CALL_set_thread(thd->get_psi());
|
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. */
|
/* Login. */
|
||||||
thread_attach(thd);
|
thread_attach(thd);
|
||||||
|
mysql_socket_set_thread_owner(thd->net.vio->mysql_socket);
|
||||||
re_init_net_server_extension(thd);
|
re_init_net_server_extension(thd);
|
||||||
ulonglong now= microsecond_interval_timer();
|
ulonglong now= microsecond_interval_timer();
|
||||||
thd->prior_thr_create_utime= now;
|
thd->prior_thr_create_utime= now;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user