summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.mysql.com>2007-02-06 14:44:05 +0100
committerunknown <msvensson@pilot.mysql.com>2007-02-06 14:44:05 +0100
commit31aee856d83684d4f53e6037d02e1240f694e7cb (patch)
treeb6759c4bcd7a2db701145b582e202997ba869824 /sql-common
parentb93d81a8d10c7a0e03ca3f114ab1ad8066465293 (diff)
parent4660f6d5ef3381f1e0981268308fb14796707a4f (diff)
downloadmariadb-git-31aee856d83684d4f53e6037d02e1240f694e7cb.tar.gz
Merge 192.168.0.10:mysql/mysql-4.1-maint
into pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint mysys/default.c: Auto merged sql/mysqld.cc: Auto merged sql/sql_prepare.cc: Auto merged
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 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;