diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc index 9e0cb07b86c3b..75b8f821d2261 100644 --- a/sql/threadpool_common.cc +++ b/sql/threadpool_common.cc @@ -148,9 +148,8 @@ int threadpool_add_connection(THD *thd) if (!setup_connection_thread_globals(thd)) { - if (!login_connection(thd)) + if (!thd_prepare_connection(thd)) { - prepare_new_connection_state(thd); /* Check if THD is ok, as prepare_new_connection_state()