diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2021-08-02 10:11:41 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2021-08-02 10:11:41 +0200 |
commit | 6efb5e9f5e3cd3ec811ae832a67e1878c14f0dea (patch) | |
tree | b7c1a18b8bbc638ee12951d1d04db6d21bebcaed /sql/threadpool_common.cc | |
parent | 07674e6a741a82d2e30f9798f699209a6c34dfef (diff) | |
parent | ec8882b9ddbba2f9fc3571a1ac2ade0dabf412d9 (diff) | |
download | mariadb-git-6efb5e9f5e3cd3ec811ae832a67e1878c14f0dea.tar.gz |
Merge branch '10.5' into 10.6
Diffstat (limited to 'sql/threadpool_common.cc')
-rw-r--r-- | sql/threadpool_common.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc index 07555ac21ed..97c6c317cc4 100644 --- a/sql/threadpool_common.cc +++ b/sql/threadpool_common.cc @@ -250,6 +250,14 @@ static THD *threadpool_add_connection(CONNECT *connect, TP_connection *c) { THD *thd= NULL; + DBUG_EXECUTE_IF("CONNECT_wait", + { + extern Dynamic_array<MYSQL_SOCKET> listen_sockets; + DBUG_ASSERT(listen_sockets.size()); + while (listen_sockets.size()) + my_sleep(1000); + }); + /* Create a new connection context: mysys_thread_var and PSI thread Store them in THD. @@ -267,10 +275,10 @@ static THD *threadpool_add_connection(CONNECT *connect, TP_connection *c) my_thread_end(); return NULL; } - delete connect; thd->event_scheduler.data= c; - server_threads.insert(thd); + server_threads.insert(thd); // Make THD visible in show processlist + delete connect; // must be after server_threads.insert, see close_connections() thd->set_mysys_var(mysys_var); /* Login. */ |