You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Fixed double close (introduced in PR275)
This commit is contained in:
@@ -287,37 +287,28 @@ static int test_frm_bug(MYSQL *mysql)
|
||||
}
|
||||
|
||||
rc= mysql_query(mysql, "SHOW TABLE STATUS like 'test_frm_bug'");
|
||||
if (rc)
|
||||
fclose(test_file);
|
||||
|
||||
fclose(test_file);
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
result= mysql_store_result(mysql);
|
||||
if(!result)
|
||||
fclose(test_file);
|
||||
FAIL_IF(!result, "Invalid result set");/* It can't be NULL */
|
||||
|
||||
rc= 0;
|
||||
while (mysql_fetch_row(result))
|
||||
rc++;
|
||||
if(rc != 1)
|
||||
fclose(test_file);
|
||||
FAIL_UNLESS(rc == 1, "rowcount != 1");
|
||||
|
||||
mysql_data_seek(result, 0);
|
||||
|
||||
row= mysql_fetch_row(result);
|
||||
if(!row)
|
||||
fclose(test_file);
|
||||
FAIL_IF(!row, "couldn't fetch row");
|
||||
|
||||
if(row[17] != 0)
|
||||
fclose(test_file);
|
||||
FAIL_UNLESS(row[17] != 0, "row[17] != 0");
|
||||
|
||||
mysql_free_result(result);
|
||||
mysql_stmt_close(stmt);
|
||||
|
||||
fclose(test_file);
|
||||
mysql_query(mysql, "drop table if exists test_frm_bug");
|
||||
unlink(test_frm);
|
||||
return OK;
|
||||
|
Reference in New Issue
Block a user