Skip to content

Commit df09d5e

Browse files
committed
MDEV-10559: main.mysql_client_test_nonblock crashes in buildbot on 10.0
Fix tests which possibly fail connects in non_blocking mode.
1 parent 47a1087 commit df09d5e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/mysql_client_test.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18440,9 +18440,10 @@ static void test_bug58036()
1844018440
/* Part1: try to connect with ucs2 client character set */
1844118441
conn= mysql_client_init(NULL);
1844218442
mysql_options(conn, MYSQL_SET_CHARSET_NAME, "ucs2");
18443+
1844318444
if (mysql_real_connect(conn, opt_host, opt_user,
1844418445
opt_password, opt_db ? opt_db : "test",
18445-
opt_port, opt_unix_socket, 0))
18446+
opt_port, opt_unix_socket, CLIENT_REMEMBER_OPTIONS))
1844618447
{
1844718448
if (!opt_silent)
1844818449
printf("mysql_real_connect() succeeded (failure expected)\n");
@@ -18468,7 +18469,7 @@ static void test_bug58036()
1846818469
mysql_options(conn, MYSQL_SET_CHARSET_NAME, "latin1");
1846918470
if (!mysql_real_connect(conn, opt_host, opt_user,
1847018471
opt_password, opt_db ? opt_db : "test",
18471-
opt_port, opt_unix_socket, 0))
18472+
opt_port, opt_unix_socket, CLIENT_REMEMBER_OPTIONS))
1847218473
{
1847318474
if (!opt_silent)
1847418475
printf("mysql_real_connect() failed: %s (%d)\n",
@@ -18490,7 +18491,6 @@ static void test_bug58036()
1849018491
printf("Got mysql_change_user() error (expected): %s (%d)\n",
1849118492
mysql_error(conn), mysql_errno(conn));
1849218493
mysql_close(conn);
18493-
1849418494
DBUG_VOID_RETURN;
1849518495
}
1849618496

@@ -19344,8 +19344,9 @@ static void test_big_packet()
1934419344

1934519345
if (!(mysql_real_connect(mysql_local, opt_host, opt_user,
1934619346
opt_password, current_db, opt_port,
19347-
opt_unix_socket, 0)))
19347+
opt_unix_socket, CLIENT_REMEMBER_OPTIONS)))
1934819348
{
19349+
mysql_close(mysql_local);
1934919350
fprintf(stderr, "\n connection failed(%s)", mysql_error(mysql_local));
1935019351
exit(1);
1935119352
}

0 commit comments

Comments
 (0)