diff options
author | msvensson@pilot.mysql.com <> | 2007-01-29 14:31:48 +0100 |
---|---|---|
committer | msvensson@pilot.mysql.com <> | 2007-01-29 14:31:48 +0100 |
commit | 7eaa82ea38e1a9f0598ecfc88439583b51567e64 (patch) | |
tree | 439ceec10fe0ab45b030eb00f2e47e06330862a3 /sql-common | |
parent | 29be5ce83641ff65adc7f2059efb0e5adec1079c (diff) | |
download | mariadb-git-7eaa82ea38e1a9f0598ecfc88439583b51567e64.tar.gz |
Bug#22943 syscall pruning in libmysql
- Set the timeout values only where needed
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 87e22624dd9..431c1bdf418 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1881,11 +1881,17 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, goto error; } vio_keepalive(net->vio,TRUE); - /* Override local client variables */ + + /* If user set read_timeout, let it override the default */ if (mysql->options.read_timeout) net->read_timeout= mysql->options.read_timeout; + vio_timeout(net->vio, 0, net->read_timeout); + + /* If user set write_timeout, let it override the default */ if (mysql->options.write_timeout) net->write_timeout= mysql->options.write_timeout; + vio_timeout(net->vio, 1, net->write_timeout); + if (mysql->options.max_allowed_packet) net->max_packet_size= mysql->options.max_allowed_packet; |