1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-14412 Support TCP keepalive options

Based on pull request by Oleg Obleukhov
https://github.com/MariaDB/server/pull/400
This commit is contained in:
Vladislav Vaintroub
2017-11-17 19:36:47 +00:00
parent faee08c10c
commit e0a00c5a2f
12 changed files with 542 additions and 286 deletions

View File

@ -45,6 +45,7 @@ HASH global_index_stats;
extern mysql_mutex_t LOCK_global_user_client_stats;
extern mysql_mutex_t LOCK_global_table_stats;
extern mysql_mutex_t LOCK_global_index_stats;
extern vio_keepalive_opts opt_vio_keepalive;
/*
Get structure for logging connection data for the current user
@ -1064,7 +1065,8 @@ static int check_connection(THD *thd)
bzero((char*) &net->vio->remote, sizeof(net->vio->remote));
}
vio_keepalive(net->vio, TRUE);
vio_set_keepalive_options(net->vio, &opt_vio_keepalive);
if (thd->packet.alloc(thd->variables.net_buffer_length))
{
/*