summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-01-05 10:48:03 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-01-05 10:48:03 +0200
commit4e7b382d3132e6be0e597d19d6467a9f58b459a7 (patch)
treed4b3816306cfb922de1e593386ecbf38492922ed /client/mysqltest.cc
parent348ccb6f038a6c108ab9b6a01bdc356cefecd3d4 (diff)
parent758af98ff7c47cc1fb5debdc138312fa389d528f (diff)
downloadmariadb-git-4e7b382d3132e6be0e597d19d6467a9f58b459a7.tar.gz
Merge 10.1 to 10.2
Most conflicts are related to the MDEV-11638 InnoDB shutdown refactoring.
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index c7b049ac45d..f0c56bc639c 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -5786,6 +5786,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;
@@ -5892,6 +5893,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);
@@ -5976,6 +5982,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)
{