summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.mysql.com>2007-01-29 14:33:53 +0100
committerunknown <msvensson@pilot.mysql.com>2007-01-29 14:33:53 +0100
commit7620e066dbf16f170ce1a5baa516eb7c560c9a51 (patch)
tree5ff0b0c41c572069a02dbb2c6eabec3d10d8900d /sql-common
parent39fb7b2423c01b168ca4947307426edb945abfe2 (diff)
parenta195ad5ea26227dac0d5f503b9e37717b2bc40be (diff)
downloadmariadb-git-7620e066dbf16f170ce1a5baa516eb7c560c9a51.tar.gz
Merge pilot.mysql.com:/home/msvensson/mysql/bug22943/my41-bug22943
into pilot.mysql.com:/home/msvensson/mysql/bug22943/my50-bug22943 sql/mysqld.cc: Auto merged sql/net_serv.cc: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.cc: Auto merged sql-common/client.c: Auto merged sql/slave.cc: Auto merged sql/sql_repl.cc: Auto merged vio/vio.c: Auto merged vio/viossl.c: Auto merged sql/mysql_priv.h: Manual merge sql/sql_parse.cc: Manual merge
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index bcba50548ca..a627619550a 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -2044,11 +2044,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;