Commit 57dd892c authored by Sergei Golubchik's avatar Sergei Golubchik

fix memory leaks in mysql_client_test

This fixes main.mysql_client_test, main.mysql_client_test_comp,
main.mysql_client_test_nonblock failures
in ASAN_OPTIONS="abort_on_error=1" runs
parent 2f742b57
...@@ -18426,6 +18426,7 @@ static void test_bug42373() ...@@ -18426,6 +18426,7 @@ static void test_bug42373()
DIE_UNLESS(rc == 1); DIE_UNLESS(rc == 1);
mysql_stmt_close(stmt); mysql_stmt_close(stmt);
mysql_close(&con);
/* Now try with a multi-statement. */ /* Now try with a multi-statement. */
DIE_UNLESS(mysql_client_init(&con)); DIE_UNLESS(mysql_client_init(&con));
...@@ -18888,8 +18889,6 @@ static void test_progress_reporting() ...@@ -18888,8 +18889,6 @@ static void test_progress_reporting()
conn= client_connect(CLIENT_PROGRESS_OBSOLETE, MYSQL_PROTOCOL_TCP, 0); conn= client_connect(CLIENT_PROGRESS_OBSOLETE, MYSQL_PROTOCOL_TCP, 0);
if (!(conn->server_capabilities & CLIENT_PROGRESS_OBSOLETE))
return;
DIE_UNLESS(conn->client_flag & CLIENT_PROGRESS_OBSOLETE); DIE_UNLESS(conn->client_flag & CLIENT_PROGRESS_OBSOLETE);
mysql_options(conn, MYSQL_PROGRESS_CALLBACK, (void*) report_progress); mysql_options(conn, MYSQL_PROGRESS_CALLBACK, (void*) report_progress);
...@@ -19739,6 +19738,7 @@ static void test_bulk_delete() ...@@ -19739,6 +19738,7 @@ static void test_bulk_delete()
DIE_IF(atoi(row[0]) != 3); DIE_IF(atoi(row[0]) != 3);
} }
DIE_IF(i != 1); DIE_IF(i != 1);
mysql_free_result(result);
rc= mysql_query(mysql, "DROP TABLE t1"); rc= mysql_query(mysql, "DROP TABLE t1");
myquery(rc); myquery(rc);
......
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