summaryrefslogtreecommitdiff
path: root/sql/scheduler.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2019-05-19 01:04:22 +0400
committerSergey Vojtovich <svoj@mariadb.org>2019-05-21 17:55:09 +0400
commit6900aaf417c6540a22ab74c6badaf42cd37e43e1 (patch)
treebea97b94460d55d507180c42535cc658b6d7400a /sql/scheduler.cc
parent8d9d4aa6d6db96d09006ea268cf9c29f46c9f132 (diff)
downloadmariadb-git-6900aaf417c6540a22ab74c6badaf42cd37e43e1.tar.gz
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
Diffstat (limited to 'sql/scheduler.cc')
-rw-r--r--sql/scheduler.cc7
1 files changed, 0 insertions, 7 deletions
diff --git a/sql/scheduler.cc b/sql/scheduler.cc
index 818bb3818f4..59d7c548871 100644
--- a/sql/scheduler.cc
+++ b/sql/scheduler.cc
@@ -24,7 +24,6 @@
#include "mariadb.h"
#include "mysqld.h"
-#include "sql_connect.h" // init_new_connection_handler_thread
#include "scheduler.h"
#include "sql_class.h"
#include "sql_callback.h"
@@ -133,16 +132,11 @@ void one_thread_per_connection_scheduler(scheduler_functions *func,
func->max_threads= *arg_max_connections + 1;
func->max_connections= arg_max_connections;
func->connection_count= arg_connection_count;
- func->init_new_connection_thread= init_new_connection_handler_thread;
func->add_connection= create_thread_to_handle_connection;
func->end_thread= one_thread_per_connection_end;
func->post_kill_notification= post_kill_notification;
}
#else
-bool init_new_connection_handler_thread()
-{
- return 0;
-}
void handle_connection_in_main_thread(CONNECT *connect)
{
}
@@ -158,7 +152,6 @@ void one_thread_scheduler(scheduler_functions *func)
func->max_threads= 1;
func->max_connections= &max_connections;
func->connection_count= &connection_count;
- func->init_new_connection_thread= init_new_connection_handler_thread;
func->add_connection= handle_connection_in_main_thread;
func->end_thread= no_threads_end;
}