Commit 05f61ba4 authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

MDEV-10559: main.mysql_client_test_nonblock crashes in buildbot on 10.0

fix for async operations
parent df09d5e7
...@@ -3644,7 +3644,8 @@ error: ...@@ -3644,7 +3644,8 @@ error:
/* Free alloced memory */ /* Free alloced memory */
end_server(mysql); end_server(mysql);
mysql_close_free(mysql); mysql_close_free(mysql);
if (!(client_flag & CLIENT_REMEMBER_OPTIONS)) if (!(client_flag & CLIENT_REMEMBER_OPTIONS) &&
!mysql->options.extension->async_context)
mysql_close_free_options(mysql); mysql_close_free_options(mysql);
} }
DBUG_RETURN(0); DBUG_RETURN(0);
......
...@@ -455,7 +455,11 @@ MK_ASYNC_START_BODY( ...@@ -455,7 +455,11 @@ MK_ASYNC_START_BODY(
parms.db= db; parms.db= db;
parms.port= port; parms.port= port;
parms.unix_socket= unix_socket; parms.unix_socket= unix_socket;
parms.client_flags= client_flags; /*
async wrapper enforce the CLIENT_REMEMBER_OPTIONS flag to be
functional (otherwise it can't operate)
*/
parms.client_flags= client_flags | CLIENT_REMEMBER_OPTIONS;
}, },
NULL, NULL,
r_ptr, r_ptr,
......
...@@ -18443,7 +18443,7 @@ static void test_bug58036() ...@@ -18443,7 +18443,7 @@ static void test_bug58036()
if (mysql_real_connect(conn, opt_host, opt_user, if (mysql_real_connect(conn, opt_host, opt_user,
opt_password, opt_db ? opt_db : "test", opt_password, opt_db ? opt_db : "test",
opt_port, opt_unix_socket, CLIENT_REMEMBER_OPTIONS)) opt_port, opt_unix_socket, 0))
{ {
if (!opt_silent) if (!opt_silent)
printf("mysql_real_connect() succeeded (failure expected)\n"); printf("mysql_real_connect() succeeded (failure expected)\n");
...@@ -18469,7 +18469,7 @@ static void test_bug58036() ...@@ -18469,7 +18469,7 @@ static void test_bug58036()
mysql_options(conn, MYSQL_SET_CHARSET_NAME, "latin1"); mysql_options(conn, MYSQL_SET_CHARSET_NAME, "latin1");
if (!mysql_real_connect(conn, opt_host, opt_user, if (!mysql_real_connect(conn, opt_host, opt_user,
opt_password, opt_db ? opt_db : "test", opt_password, opt_db ? opt_db : "test",
opt_port, opt_unix_socket, CLIENT_REMEMBER_OPTIONS)) opt_port, opt_unix_socket, 0))
{ {
if (!opt_silent) if (!opt_silent)
printf("mysql_real_connect() failed: %s (%d)\n", printf("mysql_real_connect() failed: %s (%d)\n",
...@@ -19344,7 +19344,7 @@ static void test_big_packet() ...@@ -19344,7 +19344,7 @@ static void test_big_packet()
if (!(mysql_real_connect(mysql_local, opt_host, opt_user, if (!(mysql_real_connect(mysql_local, opt_host, opt_user,
opt_password, current_db, opt_port, opt_password, current_db, opt_port,
opt_unix_socket, CLIENT_REMEMBER_OPTIONS))) opt_unix_socket, 0)))
{ {
mysql_close(mysql_local); mysql_close(mysql_local);
fprintf(stderr, "\n connection failed(%s)", mysql_error(mysql_local)); fprintf(stderr, "\n connection failed(%s)", mysql_error(mysql_local));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment