1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00
This commit is contained in:
Georg Richter
2018-05-29 11:43:47 +02:00
7 changed files with 66 additions and 13 deletions

View File

@@ -4719,7 +4719,43 @@ static int test_codbc138(MYSQL *mysql)
return OK;
}
static int test_conc334(MYSQL *mysql)
{
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
MYSQL_RES *result;
MYSQL_FIELD *field;
int rc;
rc= mysql_stmt_prepare(stmt, SL("SHOW ENGINES"));
check_stmt_rc(rc, stmt);
rc= mysql_stmt_execute(stmt);
check_stmt_rc(rc, stmt);
result= mysql_stmt_result_metadata(stmt);
if (!result)
{
diag("Coudn't retrieve result set");
mysql_stmt_close(stmt);
return FAIL;
}
mysql_field_seek(result, 0);
while ((field= mysql_fetch_field(result)))
{
FAIL_IF(field->name_length == 0, "Invalid name length (0)");
FAIL_IF(field->table_length == 0, "Invalid name length (0)");
}
mysql_free_result(result);
mysql_stmt_close(stmt);
return OK;
}
struct my_tests_st my_tests[] = {
{"test_conc334", test_conc334, TEST_CONNECTION_NEW, 0, NULL, NULL},
{"test_compress", test_compress, TEST_CONNECTION_NEW, CLIENT_COMPRESS, NULL, NULL},
{"test_codbc138", test_codbc138, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_conc208", test_conc208, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},