summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2005-01-12 20:28:31 +0300
committerkonstantin@mysql.com <>2005-01-12 20:28:31 +0300
commit8b33aad4e4419acb6eacef40f40e347bbea62e80 (patch)
tree74c11ad91e4afe82bb826dd1a720fd671284bc63 /tests
parent2cc2844bbb4f88eb8a655fd5369be708ecf406b7 (diff)
downloadmariadb-git-8b33aad4e4419acb6eacef40f40e347bbea62e80.tar.gz
A test case for Bug#6761 "mysql_list_fields doesn't work"
Diffstat (limited to 'tests')
-rw-r--r--tests/client_test.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/client_test.c b/tests/client_test.c
index dc18929341c..beaff795d0e 100644
--- a/tests/client_test.c
+++ b/tests/client_test.c
@@ -11503,6 +11503,29 @@ static void test_rewind(void)
rc= mysql_stmt_close(stmt);
}
+
+/* Bug#6761 - mysql_list_fields doesn't work */
+
+static void test_bug6761(void)
+{
+ const char *stmt_text;
+ MYSQL_RES *res;
+ int rc;
+ myheader("test_bug6761");
+
+ stmt_text= "CREATE TABLE t1 (a int, b char(255), c decimal)";
+ rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+ myquery(rc);
+
+ res= mysql_list_fields(mysql, "t1", "%");
+ DIE_UNLESS(res && mysql_num_fields(res) == 3);
+ mysql_free_result(res);
+
+ stmt_text= "DROP TABLE t1";
+ rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
+ myquery(rc);
+}
+
/*
Read and parse arguments and MySQL options from my.cnf
*/
@@ -11709,6 +11732,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug4172", test_bug4172 },
{ "test_conversion", test_conversion },
{ "test_rewind", test_rewind },
+ { "test_bug6761", test_bug6761 },
{ 0, 0 }
};