Commit c90c7698 authored by Sergey Vojtovich's avatar Sergey Vojtovich

Simplified away CONNECT::host

Part of MDEV-19515 - Improve connect speed
parent 56b1cdde
......@@ -376,7 +376,6 @@ struct Pipe_Listener : public Listener
statistic_increment(connection_errors_internal, &LOCK_status);
return;
}
connect->host= my_localhost;
create_new_thread(connect);
}
......
......@@ -6293,7 +6293,6 @@ void create_new_thread(CONNECT *connect)
void handle_accepted_socket(MYSQL_SOCKET new_sock, MYSQL_SOCKET sock)
{
CONNECT *connect;
bool is_unix_sock;
#ifdef HAVE_LIBWRAP
{
......@@ -6342,8 +6341,8 @@ void handle_accepted_socket(MYSQL_SOCKET new_sock, MYSQL_SOCKET sock)
if ((connect= new CONNECT()))
{
is_unix_sock= (mysql_socket_getfd(sock) ==
mysql_socket_getfd(unix_sock));
bool is_unix_sock= mysql_socket_getfd(sock) ==
mysql_socket_getfd(unix_sock);
if (!(connect->vio=
mysql_socket_vio_new(new_sock,
......@@ -6365,9 +6364,6 @@ void handle_accepted_socket(MYSQL_SOCKET new_sock, MYSQL_SOCKET sock)
return;
}
if (is_unix_sock)
connect->host= my_localhost;
if (mysql_socket_getfd(sock) == mysql_socket_getfd(extra_ip_sock))
{
connect->extra_port= 1;
......
......@@ -1517,7 +1517,10 @@ THD *CONNECT::create_thd(THD *thd)
init_net_server_extension(thd);
thd->security_ctx->host= host;
thd->security_ctx->host= thd->net.vio->type == VIO_TYPE_NAMEDPIPE ||
thd->net.vio->type == VIO_TYPE_SOCKET ?
my_localhost : 0;
thd->extra_port= extra_port;
thd->scheduler= scheduler;
thd->real_id= real_id;
......
......@@ -32,7 +32,6 @@ class CONNECT : public ilink {
public:
/* To be copied to THD */
Vio *vio; /* Copied to THD with my_net_init() */
const char *host;
scheduler_functions *scheduler;
my_thread_id thread_id;
pthread_t real_id;
......@@ -43,7 +42,7 @@ class CONNECT : public ilink {
ulonglong prior_thr_create_utime;
CONNECT()
:vio(0), host(0), scheduler(thread_scheduler), thread_id(0), real_id(0),
:vio(0), scheduler(thread_scheduler), thread_id(0), real_id(0),
extra_port(0),
thread_count_incremented(0), prior_thr_create_utime(0)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment