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

Moved vio allocation to connection thread

Part of MDEV-19515 - Improve connect speed
This commit is contained in:
Sergey Vojtovich
2019-05-17 00:38:35 +04:00
parent efb61c12a9
commit ce30c99478
6 changed files with 58 additions and 56 deletions

View File

@ -1433,14 +1433,13 @@ TP_connection_generic::TP_connection_generic(CONNECT *c):
, overlapped()
#endif
{
DBUG_ASSERT(c->vio);
DBUG_ASSERT(c->vio_type != VIO_CLOSED);
#ifdef _WIN32
vio_type= c->vio->type;
fd= (vio_type == VIO_TYPE_NAMEDPIPE) ?
c->vio->hPipe: (TP_file_handle)mysql_socket_getfd(c->vio->mysql_socket);
fd= (c->vio_type == VIO_TYPE_NAMEDPIPE) ?
c->pipe: (TP_file_handle) mysql_socket_getfd(c->sock);
#else
fd= mysql_socket_getfd(c->vio->mysql_socket);
fd= mysql_socket_getfd(c->sock);
#endif
/* Assign connection to a group. */