summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-08 11:19:48 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-08 11:19:48 +0200
commitc67b306e4f90788b979bf85f5a2ab282798fc897 (patch)
treeb7fa51ab7bacbf5ed8c20367f009625a7da0f95b /tests
parent91d7e7b244be2ebf39eb135bacea99ed19657475 (diff)
parent94eb56fb29334a1075103becb625685b23f7d437 (diff)
downloadmariadb-git-c67b306e4f90788b979bf85f5a2ab282798fc897.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 6d17fa74005..cac7c95b280 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -18540,6 +18540,7 @@ static void test_bug42373()
DIE_UNLESS(rc == 1);
mysql_stmt_close(stmt);
+ mysql_close(&con);
/* Now try with a multi-statement. */
DIE_UNLESS(mysql_client_init(&con));
@@ -19002,8 +19003,6 @@ static void test_progress_reporting()
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);
mysql_options(conn, MYSQL_PROGRESS_CALLBACK, (void*) report_progress);
@@ -20203,6 +20202,7 @@ static void test_proxy_header_tcp(const char *ipaddr, int port)
printf("%.*s %.*s\n", (int)addrlen, row[0], (int)addrlen, normalized_addr);
DIE_UNLESS(strncmp(row[0], normalized_addr, addrlen) == 0);
DIE_UNLESS(atoi(row[0] + addrlen+1) == port);
+ mysql_free_result(result);
mysql_close(m);
}
sprintf(query,"DROP USER 'u'@'%s'",normalized_addr);
@@ -20241,6 +20241,7 @@ static void test_proxy_header_localhost()
mytest(result);
row = mysql_fetch_row(result);
DIE_UNLESS(strcmp(row[0], "localhost") == 0);
+ mysql_free_result(result);
mysql_close(m);
rc = mysql_query(mysql, "DROP USER 'u'@'localhost'");
myquery(rc);
@@ -20338,6 +20339,7 @@ static void test_bulk_autoinc()
{
DIE_IF(atoi(row[0]) != id[i++]);
}
+ mysql_free_result(result);
rc= mysql_query(mysql, "DROP TABLE ai_field_value");
myquery(rc);
}
@@ -20397,6 +20399,7 @@ static void test_bulk_delete()
DIE_IF(atoi(row[0]) != 3);
}
DIE_IF(i != 1);
+ mysql_free_result(result);
rc= mysql_query(mysql, "DROP TABLE t1");
myquery(rc);
@@ -20453,6 +20456,7 @@ static void test_explain_meta()
mct_close_log();
DIE("num_fields != 1");
}
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
strmov(query, "EXPLAIN SELECT 1");
@@ -20469,6 +20473,7 @@ static void test_explain_meta()
DIE("num_fields != 10");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
strmov(query, "EXPLAIN format=json SELECT 1");
@@ -20485,6 +20490,7 @@ static void test_explain_meta()
DIE("num_fields != 1");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
@@ -20502,6 +20508,7 @@ static void test_explain_meta()
DIE("num_fields != 13");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
strmov(query, "ANALYZE format=json SELECT 1");
@@ -20518,6 +20525,7 @@ static void test_explain_meta()
DIE("num_fields != 1");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "CREATE TABLE t1 (a int)");
@@ -20537,6 +20545,7 @@ static void test_explain_meta()
DIE("num_fields != 10");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
strmov(query, "EXPLAIN format=json INSERT INTO t1 values(1)");
@@ -20553,6 +20562,7 @@ static void test_explain_meta()
DIE("num_fields != 1");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
@@ -20570,6 +20580,7 @@ static void test_explain_meta()
DIE("num_fields != 13");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
strmov(query, "ANALYZE format=json INSERT INTO t1 values(1)");
@@ -20586,6 +20597,7 @@ static void test_explain_meta()
DIE("num_fields != 1");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
@@ -20603,6 +20615,7 @@ static void test_explain_meta()
DIE("num_fields != 10");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
strmov(query, "EXPLAIN format=json UPDATE t1 set a=2");
@@ -20619,6 +20632,7 @@ static void test_explain_meta()
DIE("num_fields != 1");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
@@ -20636,6 +20650,7 @@ static void test_explain_meta()
DIE("num_fields != 13");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
strmov(query, "ANALYZE format=json UPDATE t1 set a=2");
@@ -20652,6 +20667,7 @@ static void test_explain_meta()
DIE("num_fields != 1");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
@@ -20669,6 +20685,7 @@ static void test_explain_meta()
DIE("num_fields != 10");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
strmov(query, "EXPLAIN format=json DELETE FROM t1");
@@ -20685,6 +20702,7 @@ static void test_explain_meta()
DIE("num_fields != 1");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
@@ -20702,6 +20720,7 @@ static void test_explain_meta()
DIE("num_fields != 13");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
strmov(query, "ANALYZE format=json DELETE FROM t1");
@@ -20718,6 +20737,7 @@ static void test_explain_meta()
DIE("num_fields != 1");
}
print_metadata(rs_metadata, num_fields);
+ mysql_free_result(rs_metadata);
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP TABLE t1");