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-458:

Fixed crash in mysql_get_timeout and mysql_get_timeout_ms functions,
which happened when no asynchronous context was set before.
This commit is contained in:
Georg Richter
2020-03-05 09:50:12 +01:00
parent 6a0c8ff2e5
commit d4f75481f6
2 changed files with 16 additions and 2 deletions

View File

@@ -1435,8 +1435,17 @@ static int test_conc457(MYSQL *mysql)
return OK;
}
static int test_conc458(MYSQL *my __attribute__((unused)))
{
MYSQL *mysql= mysql_init(NULL);
FAIL_IF(mysql_get_timeout_value(mysql) != 0, "expected timeout 0");
mysql_close(mysql);
return OK;
}
struct my_tests_st my_tests[] = {
{"test_conc458", test_conc458, TEST_CONNECTION_NONE, 0, NULL, NULL},
{"test_conc457", test_conc457, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_conc384", test_conc384, TEST_CONNECTION_NONE, 0, NULL, NULL},
#ifndef _WIN32