| 352 | |
| 353 | |
| 354 | static void threadpool_remove_connection(THD *thd) |
| 355 | { |
| 356 | thread_attach(thd); |
| 357 | thd->net.reading_or_writing = 0; |
| 358 | end_connection(thd); |
| 359 | close_connection(thd, 0); |
| 360 | unlink_thd(thd); |
| 361 | PSI_CALL_delete_current_thread(); // before THD is destroyed |
| 362 | delete thd; |
| 363 | |
| 364 | /* |
| 365 | Free resources associated with this connection: |
| 366 | mysys thread_var and PSI thread. |
| 367 | */ |
| 368 | my_thread_end(); |
| 369 | } |
| 370 | |
| 371 | |
| 372 | /* |
no test coverage detected