summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-01-04 13:56:11 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-01-04 13:56:11 +0200
commit0c1de94db669ef494bdbbec0bbdc51f6df73668d (patch)
tree703929507e4fa34fcfb2b2da7a87e550639c6f2c /client
parentba8198a34cf651cce8a1f59f61ba7f31dbe41579 (diff)
parent80d5d1452a4a6b7bd1627116f2a5a950003fc3cb (diff)
downloadmariadb-git-0c1de94db669ef494bdbbec0bbdc51f6df73668d.tar.gz
Merge 10.0 into 10.1
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index f2c4f9ef867..daf25fea7c0 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -5800,6 +5800,7 @@ void do_connect(struct st_command *command)
my_bool con_shm __attribute__ ((unused))= 0;
int read_timeout= 0;
int write_timeout= 0;
+ int connect_timeout= 0;
struct st_connection* con_slot;
static DYNAMIC_STRING ds_connection_name;
@@ -5906,6 +5907,11 @@ void do_connect(struct st_command *command)
{
write_timeout= atoi(con_options + sizeof("write_timeout=")-1);
}
+ else if (strncasecmp(con_options, "connect_timeout=",
+ sizeof("connect_timeout=")-1) == 0)
+ {
+ connect_timeout= atoi(con_options + sizeof("connect_timeout=")-1);
+ }
else
die("Illegal option to connect: %.*s",
(int) (end - con_options), con_options);
@@ -5990,6 +5996,12 @@ void do_connect(struct st_command *command)
(char*)&write_timeout);
}
+ if (connect_timeout)
+ {
+ mysql_options(con_slot->mysql, MYSQL_OPT_CONNECT_TIMEOUT,
+ (char*)&connect_timeout);
+ }
+
#ifdef HAVE_SMEM
if (con_shm)
{