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

Simplified away init_new_connection_thread()

It was meaningful only for one-thread-per-connection scheduler anyway,
so call init_new_connection_handler_thread() directly from
handle_one_connection().

It was somewhat harmful for no-threads scheduler, because it'd attempt to
detach main thread on AIX_3_2 and Siemens unix (and DEC OSF/1 3.2 too).
Also it does duplicate my_thread_init() call, which may produce a warning
under EXTRA_DEBUG_THREADS.

start_wsrep_THD() shouldn't have called it at all: it already detached
and called my_thread_init().

Part of MDEV-19515 - Improve connect speed
This commit is contained in:
Sergey Vojtovich
2019-05-19 01:04:22 +04:00
parent 8d9d4aa6d6
commit 6900aaf417
6 changed files with 9 additions and 25 deletions

View File

@ -383,11 +383,6 @@ end:
/* Dummy functions, do nothing */
static bool tp_init_new_connection_thread()
{
return 0;
}
static bool tp_end_thread(THD *, bool)
{
return 0;
@ -512,7 +507,6 @@ static scheduler_functions tp_scheduler_functions=
NULL,
NULL,
tp_init, // init
tp_init_new_connection_thread, // init_new_connection_thread
tp_add_connection, // add_connection
tp_wait_begin, // thd_wait_begin
tp_wait_end, // thd_wait_end