mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +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:
@ -1107,6 +1107,14 @@ static int check_connection(THD *thd)
|
||||
|
||||
bool setup_connection_thread_globals(THD *thd)
|
||||
{
|
||||
|
||||
DBUG_EXECUTE_IF("CONNECT_wait", {
|
||||
extern MYSQL_SOCKET unix_sock;
|
||||
DBUG_ASSERT(unix_sock.fd >= 0);
|
||||
while (unix_sock.fd >= 0)
|
||||
my_sleep(1000);
|
||||
});
|
||||
|
||||
if (thd->store_globals())
|
||||
{
|
||||
close_connection(thd, ER_OUT_OF_RESOURCES);
|
||||
@ -1360,14 +1368,6 @@ void do_handle_one_connection(CONNECT *connect)
|
||||
return;
|
||||
}
|
||||
|
||||
DBUG_EXECUTE_IF("CONNECT_wait",
|
||||
{
|
||||
extern MYSQL_SOCKET unix_sock;
|
||||
DBUG_ASSERT(unix_sock.fd >= 0);
|
||||
while (unix_sock.fd >= 0)
|
||||
my_sleep(1000);
|
||||
});
|
||||
|
||||
/*
|
||||
If a thread was created to handle this connection:
|
||||
increment slow_launch_threads counter if it took more than
|
||||
|
Reference in New Issue
Block a user