summaryrefslogtreecommitdiff
path: root/tests/mysql_client_test.c
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2016-08-15 16:28:19 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2016-08-15 16:29:23 +0200
commitdf09d5e724af93fea096fd841fad9e93d2615ad5 (patch)
treeee900fe66d729c72fe9c450b66f0ab64aa4c50b4 /tests/mysql_client_test.c
parent47a1087ff6c402eda6ac2229fc132defc97dadf9 (diff)
downloadmariadb-git-df09d5e724af93fea096fd841fad9e93d2615ad5.tar.gz
MDEV-10559: main.mysql_client_test_nonblock crashes in buildbot on 10.0
Fix tests which possibly fail connects in non_blocking mode.
Diffstat (limited to 'tests/mysql_client_test.c')
-rw-r--r--tests/mysql_client_test.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index fcc89482f4e..640ba298556 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -18440,9 +18440,10 @@ static void test_bug58036()
/* Part1: try to connect with ucs2 client character set */
conn= mysql_client_init(NULL);
mysql_options(conn, MYSQL_SET_CHARSET_NAME, "ucs2");
+
if (mysql_real_connect(conn, opt_host, opt_user,
opt_password, opt_db ? opt_db : "test",
- opt_port, opt_unix_socket, 0))
+ opt_port, opt_unix_socket, CLIENT_REMEMBER_OPTIONS))
{
if (!opt_silent)
printf("mysql_real_connect() succeeded (failure expected)\n");
@@ -18468,7 +18469,7 @@ static void test_bug58036()
mysql_options(conn, MYSQL_SET_CHARSET_NAME, "latin1");
if (!mysql_real_connect(conn, opt_host, opt_user,
opt_password, opt_db ? opt_db : "test",
- opt_port, opt_unix_socket, 0))
+ opt_port, opt_unix_socket, CLIENT_REMEMBER_OPTIONS))
{
if (!opt_silent)
printf("mysql_real_connect() failed: %s (%d)\n",
@@ -18490,7 +18491,6 @@ static void test_bug58036()
printf("Got mysql_change_user() error (expected): %s (%d)\n",
mysql_error(conn), mysql_errno(conn));
mysql_close(conn);
-
DBUG_VOID_RETURN;
}
@@ -19344,8 +19344,9 @@ static void test_big_packet()
if (!(mysql_real_connect(mysql_local, opt_host, opt_user,
opt_password, current_db, opt_port,
- opt_unix_socket, 0)))
+ opt_unix_socket, CLIENT_REMEMBER_OPTIONS)))
{
+ mysql_close(mysql_local);
fprintf(stderr, "\n connection failed(%s)", mysql_error(mysql_local));
exit(1);
}