diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-11-17 19:36:47 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-11-17 21:40:20 +0000 |
commit | e0a00c5a2f276a4e314785a89c84f58d033b46b3 (patch) | |
tree | a746ae593da78aa53f8aa2bce342e4099d667a31 /sql/sql_connect.cc | |
parent | faee08c10c767375aca26d126fff1a832330fc43 (diff) | |
download | mariadb-git-e0a00c5a2f276a4e314785a89c84f58d033b46b3.tar.gz |
MDEV-14412 Support TCP keepalive options
Based on pull request by Oleg Obleukhov
https://github.com/MariaDB/server/pull/400
Diffstat (limited to 'sql/sql_connect.cc')
-rw-r--r-- | sql/sql_connect.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index a100f38c02c..e428d969db0 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -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)) { /* |