You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Test case fixes:
- remove table af end of test - fixed memory leak (missing mysql_free_result)
This commit is contained in:
@@ -1494,10 +1494,7 @@ static int test_bug38486(MYSQL *mysql)
|
|||||||
int rc;
|
int rc;
|
||||||
unsigned long type= CURSOR_TYPE_READ_ONLY;
|
unsigned long type= CURSOR_TYPE_READ_ONLY;
|
||||||
|
|
||||||
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t10");
|
rc= mysql_query(mysql, "CREATE TEMPORARY TABLE t10 (a INT)");
|
||||||
check_mysql_rc(rc, mysql);
|
|
||||||
|
|
||||||
rc= mysql_query(mysql, "CREATE TABLE t10 (a INT)");
|
|
||||||
check_mysql_rc(rc, mysql);
|
check_mysql_rc(rc, mysql);
|
||||||
|
|
||||||
stmt= mysql_stmt_init(mysql);
|
stmt= mysql_stmt_init(mysql);
|
||||||
@@ -1510,6 +1507,9 @@ static int test_bug38486(MYSQL *mysql)
|
|||||||
check_stmt_rc(rc, stmt);
|
check_stmt_rc(rc, stmt);
|
||||||
mysql_stmt_close(stmt);
|
mysql_stmt_close(stmt);
|
||||||
|
|
||||||
|
rc= mysql_query(mysql, "DROP TABLE t10");
|
||||||
|
check_mysql_rc(rc, mysql);
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -848,8 +848,10 @@ static int test_conc49(MYSQL *mysql)
|
|||||||
row= mysql_fetch_row(res);
|
row= mysql_fetch_row(res);
|
||||||
if (atol(row[0]) == 0) {
|
if (atol(row[0]) == 0) {
|
||||||
diag("Load local infile disable");
|
diag("Load local infile disable");
|
||||||
|
mysql_free_result(res);
|
||||||
return SKIP;
|
return SKIP;
|
||||||
}
|
}
|
||||||
|
mysql_free_result(res);
|
||||||
|
|
||||||
fp= fopen("./sample.csv", "w");
|
fp= fopen("./sample.csv", "w");
|
||||||
for (i=1; i < 4; i++)
|
for (i=1; i < 4; i++)
|
||||||
|
Reference in New Issue
Block a user