1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Fix for CONC-604 and CONC-605:

This patch fixes a crash when reconnectiong via TLS.
This commit is contained in:
Georg Richter
2022-07-18 11:41:46 +02:00
parent dac298de61
commit 9a572bc548
8 changed files with 72 additions and 67 deletions

View File

@@ -685,13 +685,16 @@ int test_connection_timeout2(MYSQL *unused __attribute__((unused)))
SKIP_SKYSQL;
SKIP_MAXSCALE;
// SKIP_TLS;
mysql= mysql_init(NULL);
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (unsigned int *)&timeout);
mysql_options(mysql, MYSQL_INIT_COMMAND, "set @a:=SLEEP(6)");
mysql_options(mysql, MYSQL_INIT_COMMAND, "set @a:=SLEEP(7)");
start= time(NULL);
if (my_test_connect(mysql, hostname, username, password, schema, port, NULL, CLIENT_REMEMBER_OPTIONS))
{
elapsed= time(NULL) - start;
diag("elapsed: %lu", (unsigned long)elapsed);
diag("timeout error expected");
return FAIL;
}