1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-18353 - minor cleanup

Do not repeat yourself.

Instead of having the same DBUG_EXECUTE_IF code in threadpool and
thread-per-connection, add this code to setup_connection_thread_globals()
which is executed in all scheduling modes.
This commit is contained in:
Vladislav Vaintroub
2022-09-07 13:49:49 +02:00
parent c7ba237793
commit 9a8faeea14
2 changed files with 8 additions and 16 deletions

View File

@ -222,14 +222,6 @@ static THD* threadpool_add_connection(CONNECT *connect, void *scheduler_data)
{
THD *thd= NULL;
DBUG_EXECUTE_IF("CONNECT_wait",
{
extern MYSQL_SOCKET unix_sock;
DBUG_ASSERT(unix_sock.fd >= 0);
while (unix_sock.fd >= 0)
my_sleep(1000);
});
/*
Create a new connection context: mysys_thread_var and PSI thread
Store them in THD.