summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <georg@lmy002.wdf.sap.corp>2005-07-12 10:31:43 +0200
committerunknown <georg@lmy002.wdf.sap.corp>2005-07-12 10:31:43 +0200
commitc5e573dabcbeac370173c0a181a07f8cbef4310a (patch)
tree65aac3a57e0177c50cf47b7c33c57682fd1368f3 /tests
parentde1254ad792fe54b033ba106979db9854de2f976 (diff)
downloadmariadb-git-c5e573dabcbeac370173c0a181a07f8cbef4310a.tar.gz
New attempt after Bar's review
Added api function mysql_get_character_set_info which provides information about the current client character set. include/mysql.h: Added api function mysql_get_character_set_info which provides information about the current client character set. libmysql/libmysql.c: Added api function mysql_get_character_set_info which provides information about the current client character set. libmysql/libmysql.def: Added api function mysql_get_character_set_info which provides information about the current client character set. tests/mysql_client_test.c: Added api function mysql_get_character_set_info which provides information about the current client character set.
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 0c79925c3eb..121e7fa1968 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -13626,6 +13626,23 @@ static void test_bug10214()
mysql_query(mysql, "set sql_mode=''");
}
+static void test_client_character_set()
+{
+ CHARACTER_SET cs;
+ const char *csname;
+ int rc;
+
+ myheader("test_client_character_set");
+
+ csname = "utf8";
+ rc = mysql_set_character_set(mysql, csname);
+ DIE_UNLESS(rc == 0);
+
+ mysql_get_character_set_info(mysql, &cs);
+ DIE_UNLESS(!strcmp(cs.csname, "utf8"));
+ DIE_UNLESS(!strcmp(cs.name, "utf8_general_ci"));
+}
+
/*
Read and parse arguments and MySQL options from my.cnf
@@ -13850,6 +13867,7 @@ static struct my_tests_st my_tests[]= {
{ "test_cursors_with_union", test_cursors_with_union },
{ "test_truncation", test_truncation },
{ "test_truncation_option", test_truncation_option },
+ { "test_client_character_set", test_client_character_set },
{ "test_bug8330", test_bug8330 },
{ "test_bug7990", test_bug7990 },
{ "test_bug8378", test_bug8378 },