You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Fix for CONC-315:
If no default client character set was specified, the utf8 character set will be used by default (instead of setting the client character set to server character set)
This commit is contained in:
@@ -1358,7 +1358,27 @@ static int test_expired_pw(MYSQL *my)
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int test_conc315(MYSQL *mysql)
|
||||
{
|
||||
int rc;
|
||||
const char *csname;
|
||||
|
||||
if (!is_mariadb)
|
||||
return SKIP;
|
||||
|
||||
mysql_get_optionv(mysql, MYSQL_SET_CHARSET_NAME, &csname);
|
||||
FAIL_UNLESS(strcmp(csname, "utf8") == 0, "Wrong default character set");
|
||||
|
||||
rc= mysql_change_user(mysql, username, password, schema);
|
||||
check_mysql_rc(rc, mysql);
|
||||
mysql_get_optionv(mysql, MYSQL_SET_CHARSET_NAME, &csname);
|
||||
FAIL_UNLESS(strcmp(csname, "utf8") == 0, "Wrong default character set");
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
struct my_tests_st my_tests[] = {
|
||||
{"test_conc315", test_conc315, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||
{"test_expired_pw", test_expired_pw, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||
{"test_conc276", test_conc276, TEST_CONNECTION_NONE, 0, NULL, NULL},
|
||||
{"test_mdev13100", test_mdev13100, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||
|
Reference in New Issue
Block a user