File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ static bool thread_attach(THD *thd) {
108108 thd->store_globals ();
109109#ifdef HAVE_PSI_THREAD_INTERFACE
110110 PSI_THREAD_CALL (set_thread)(thd->get_psi ());
111+ mysql_thread_set_psi_THD (thd);
111112#endif
112113 mysql_socket_set_thread_owner (
113114 thd->get_protocol_classic ()->get_vio ()->mysql_socket );
@@ -191,6 +192,7 @@ void threadpool_remove_connection(THD *thd) {
191192
192193#ifdef HAVE_PSI_THREAD_INTERFACE
193194 PSI_THREAD_CALL (delete_thread)(thd->get_psi ());
195+ mysql_thread_set_psi_THD (nullptr );
194196#endif
195197
196198 Global_THD_manager::get_instance ()->remove_thd (thd);
@@ -251,6 +253,7 @@ int threadpool_process_request(THD *thd) {
251253 }
252254
253255end:
256+ mysql_thread_set_psi_THD (nullptr );
254257 if (!retval && !thd->m_server_idle ) {
255258 MYSQL_SOCKET_SET_STATE (thd->get_protocol_classic ()->get_vio ()->mysql_socket ,
256259 PSI_SOCKET_STATE_IDLE);
You can’t perform that action at this time.
0 commit comments