diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2018-09-25 16:06:32 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2018-10-05 09:29:22 +0100 |
commit | 8f329e8d37e08c28d4e39d5c87ea22300285d9cd (patch) | |
tree | 127f33d9649277bd515d61435f8cb4a193bd2b92 /sql/mysqld.h | |
parent | 25ad38abe5b3fb6bb2aafff315de256b8f1e7839 (diff) | |
download | mariadb-git-8f329e8d37e08c28d4e39d5c87ea22300285d9cd.tar.gz |
MDEV-10384 Windows : Refactor threading in mysqld startup.
Remove threads that are doing nothing but wait
- main thread now handles the connections
(if threadpool is used, also threadpool threads would wait for connections)
- thread for socket and pipe connections are removed
- shutdown thread is now removed, we wait for shutdown
notification in main thread as well
- kill_server() is also called inside the main thread, after connection
loop finished.
Diffstat (limited to 'sql/mysqld.h')
-rw-r--r-- | sql/mysqld.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/mysqld.h b/sql/mysqld.h index 6c0c7308d91..4ee795115a7 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -24,6 +24,7 @@ #include "mysql_com.h" /* SERVER_VERSION_LENGTH */ #include "my_atomic.h" #include "mysql/psi/mysql_file.h" /* MYSQL_FILE */ +#include "mysql/psi/mysql_socket.h" /* MYSQL_SOCKET */ #include "sql_list.h" /* I_List */ #include "sql_cmd.h" #include <my_rnd.h> @@ -92,6 +93,8 @@ void refresh_status(THD *thd); bool is_secure_file_path(char *path); void dec_connection_count(scheduler_functions *scheduler); extern void init_net_server_extension(THD *thd); +extern void handle_accepted_socket(MYSQL_SOCKET new_sock, MYSQL_SOCKET sock); +extern void create_new_thread(CONNECT *connect); extern "C" MYSQL_PLUGIN_IMPORT CHARSET_INFO *system_charset_info; extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *files_charset_info ; @@ -152,6 +155,7 @@ extern ulong opt_replicate_events_marked_for_skip; extern char *default_tz_name; extern Time_zone *default_tz; extern char *my_bind_addr_str; +extern int server_socket_ai_family; extern char *default_storage_engine, *default_tmp_storage_engine; extern char *enforced_storage_engine; extern char *gtid_pos_auto_engines; @@ -759,7 +763,7 @@ enum enum_query_type /* query_id */ extern query_id_t global_query_id; -ATTRIBUTE_NORETURN void unireg_end(void); +void unireg_end(void); /* increment query_id and return it. */ inline __attribute__((warn_unused_result)) query_id_t next_query_id() |