|
|
|
|
@ -1,19 +1,24 @@
|
|
|
|
|
@@ -74,12 +74,12 @@
|
|
|
|
|
char *csname= (char*) "utf8";
|
|
|
|
|
diff --git unittest/libmariadb/charset.c unittest/libmariadb/charset.c
|
|
|
|
|
index b438f8d9..0c7c5d7d 100644
|
|
|
|
|
--- unittest/libmariadb/charset.c
|
|
|
|
|
+++ unittest/libmariadb/charset.c
|
|
|
|
|
@@ -75,13 +75,13 @@ int test_client_character_set(MYSQL *mysql)
|
|
|
|
|
char *csdefault= (char*)mysql_character_set_name(mysql);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- FAIL_IF(mysql_set_character_set(mysql, csname), mysql_error(mysql));
|
|
|
|
|
+ FAIL_IF(mysql_set_character_set(mysql, csname, 0), mysql_error(mysql));
|
|
|
|
|
|
|
|
|
|
mysql_get_character_set_info(mysql, &cs);
|
|
|
|
|
|
|
|
|
|
FAIL_IF(strcmp(cs.csname, "utf8") || strcmp(cs.name, "utf8_general_ci"), "Character set != UTF8");
|
|
|
|
|
FAIL_IF(strcmp(cs.csname, "latin2") || strcmp(cs.name, "latin2_general_ci"),
|
|
|
|
|
"Character set != latin2");
|
|
|
|
|
- FAIL_IF(mysql_set_character_set(mysql, csdefault), mysql_error(mysql));
|
|
|
|
|
+ FAIL_IF(mysql_set_character_set(mysql, csdefault, 0), mysql_error(mysql));
|
|
|
|
|
|
|
|
|
|
return OK;
|
|
|
|
|
}
|
|
|
|
|
@@ -542,7 +542,7 @@
|
|
|
|
|
@@ -546,7 +546,7 @@ static int test_bug30472(MYSQL *mysql)
|
|
|
|
|
}
|
|
|
|
|
/* Retrieve character set information. */
|
|
|
|
|
|
|
|
|
|
@ -22,16 +27,16 @@
|
|
|
|
|
bug30472_retrieve_charset_info(mysql,
|
|
|
|
|
character_set_name_1,
|
|
|
|
|
character_set_client_1,
|
|
|
|
|
@@ -551,7 +551,7 @@
|
|
|
|
|
@@ -555,7 +555,7 @@ static int test_bug30472(MYSQL *mysql)
|
|
|
|
|
|
|
|
|
|
/* Switch client character set. */
|
|
|
|
|
|
|
|
|
|
- FAIL_IF(mysql_set_character_set(mysql, "utf8"), "Setting cs to utf8 failed");
|
|
|
|
|
+ FAIL_IF(mysql_set_character_set(mysql, "utf8", 0), "Setting cs to utf8 failed");
|
|
|
|
|
- FAIL_IF(mysql_set_character_set(mysql, "ascii"),
|
|
|
|
|
+ FAIL_IF(mysql_set_character_set(mysql, "ascii", 0),
|
|
|
|
|
"Setting cs to ascii failed");
|
|
|
|
|
|
|
|
|
|
/* Retrieve character set information. */
|
|
|
|
|
|
|
|
|
|
@@ -581,7 +581,7 @@
|
|
|
|
|
@@ -587,7 +587,7 @@ static int test_bug30472(MYSQL *mysql)
|
|
|
|
|
/* Call mysql_change_user() with the same username, password, database. */
|
|
|
|
|
|
|
|
|
|
rc= mysql_change_user(mysql, username, password, (schema) ? schema : "test");
|
|
|
|
|
@ -40,17 +45,17 @@
|
|
|
|
|
check_mysql_rc(rc, mysql);
|
|
|
|
|
|
|
|
|
|
/* Retrieve character set information. */
|
|
|
|
|
@@ -647,7 +647,7 @@
|
|
|
|
|
/* ignore ucs2 */
|
|
|
|
|
if (strcmp(row[0], "ucs2") && strcmp(row[0], "utf16le") && strcmp(row[0], "utf8mb4") &&
|
|
|
|
|
strcmp(row[0], "utf16") && strcmp(row[0], "utf32")) {
|
|
|
|
|
@@ -658,7 +658,7 @@ static int test_bug_54100(MYSQL *mysql)
|
|
|
|
|
&& (strcmp(row[0], "utf8") && mariadb_connection(mysql) && mysql_get_server_version(mysql) >= 100600)
|
|
|
|
|
&& strcmp(row[0], "utf16")
|
|
|
|
|
&& strcmp(row[0], "utf32")) {
|
|
|
|
|
- rc= mysql_set_character_set(mysql, row[0]);
|
|
|
|
|
+ rc= mysql_set_character_set(mysql, row[0], 0);
|
|
|
|
|
check_mysql_rc(rc, mysql);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -748,7 +748,7 @@
|
|
|
|
|
|
|
|
|
|
@@ -765,14 +765,14 @@ static int charset_auto(MYSQL *my __attribute__((unused)))
|
|
|
|
|
"character set is not os character set");
|
|
|
|
|
if (strcmp(osname, "utf8"))
|
|
|
|
|
{
|
|
|
|
|
- rc= mysql_set_character_set(mysql, "utf8");
|
|
|
|
|
@ -58,8 +63,7 @@
|
|
|
|
|
check_mysql_rc(rc, mysql);
|
|
|
|
|
|
|
|
|
|
csname2= mysql_character_set_name(mysql);
|
|
|
|
|
@@ -756,7 +756,7 @@
|
|
|
|
|
|
|
|
|
|
diag("Character set: %s", csname2);
|
|
|
|
|
FAIL_IF(!strcmp(csname2, csname1), "Wrong charset: expected utf8");
|
|
|
|
|
|
|
|
|
|
- rc= mysql_set_character_set(mysql, "auto");
|
|
|
|
|
|