From 46dab1e8841b81eb78d8c4ed39439ba2ad8c4984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 28 Oct 2020 13:16:21 +0200 Subject: [PATCH] MXS-3259: Add default connection timeout The connector never times out if one is not defined. This seems to help make the mxs1985_kill_hang test a lot more stable. --- system-test/maxtest/src/mariadb_func.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/system-test/maxtest/src/mariadb_func.cc b/system-test/maxtest/src/mariadb_func.cc index 9c2cd4054..da136d7b4 100644 --- a/system-test/maxtest/src/mariadb_func.cc +++ b/system-test/maxtest/src/mariadb_func.cc @@ -50,6 +50,9 @@ MYSQL* open_conn_db_flags(int port, set_ssl(conn); } + unsigned int timeout = 15; + mysql_options(conn, MYSQL_OPT_CONNECT_TIMEOUT, &timeout); + // MXS-2568: This fixes mxs1828_double_local_infile mysql_optionsv(conn, MYSQL_OPT_LOCAL_INFILE, (void*)"1");