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.
This commit is contained in:
Markus Mäkelä
2020-10-28 13:16:21 +02:00
parent ca1db89994
commit 46dab1e884

View File

@ -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");