diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc index 03c39d65f23..7de7866e015 100644 --- a/sql/threadpool_common.cc +++ b/sql/threadpool_common.cc @@ -202,12 +202,11 @@ void tp_callback(TP_connection *c) error: c->thd= 0; - delete c; - if (thd) { threadpool_remove_connection(thd); } + delete c; worker_context.restore(); }