summaryrefslogtreecommitdiff
path: root/sql/sql_connect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_connect.cc')
-rw-r--r--sql/sql_connect.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc
index 420a054a1b2..b050e6edd43 100644
--- a/sql/sql_connect.cc
+++ b/sql/sql_connect.cc
@@ -1377,6 +1377,8 @@ void do_handle_one_connection(CONNECT *connect, bool put_in_cache)
/* Make THD visible in show processlist */
server_threads.insert(thd);
+ if (put_in_cache)
+ thread_cache.reset_unregistered();
thd->thr_create_utime= thr_create_utime;
/* We need to set this because of time_out_user_resource_limits */
@@ -1448,6 +1450,7 @@ end_thread:
thd->start_utime= thd->thr_create_utime;
server_threads.insert(thd);
+ thread_cache.reset_unregistered();
}
delete thd;
}