minor fix for restoring the previous characterset in
test_client_character_set
This commit is contained in:
parent
00398f5e1e
commit
02599bdf27
@ -13617,12 +13617,12 @@ static void test_bug10214()
|
|||||||
static void test_client_character_set()
|
static void test_client_character_set()
|
||||||
{
|
{
|
||||||
MY_CHARSET_INFO cs;
|
MY_CHARSET_INFO cs;
|
||||||
char *csname;
|
char *csname = (char*) "utf8";
|
||||||
|
char *csdefault = (char*)mysql_character_set_name(mysql);
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
myheader("test_client_character_set");
|
myheader("test_client_character_set");
|
||||||
|
|
||||||
csname= (char*) "utf8";
|
|
||||||
rc= mysql_set_character_set(mysql, csname);
|
rc= mysql_set_character_set(mysql, csname);
|
||||||
DIE_UNLESS(rc == 0);
|
DIE_UNLESS(rc == 0);
|
||||||
|
|
||||||
@ -13630,7 +13630,7 @@ static void test_client_character_set()
|
|||||||
DIE_UNLESS(!strcmp(cs.csname, "utf8"));
|
DIE_UNLESS(!strcmp(cs.csname, "utf8"));
|
||||||
DIE_UNLESS(!strcmp(cs.name, "utf8_general_ci"));
|
DIE_UNLESS(!strcmp(cs.name, "utf8_general_ci"));
|
||||||
/* Restore the default character set */
|
/* Restore the default character set */
|
||||||
rc= mysql_query(mysql, "set names default");
|
rc= mysql_set_character_set(mysql, csdefault);
|
||||||
myquery(rc);
|
myquery(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user