1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Changed default character set from utf8 (see fix for CONC-315) to

latin1, which is also default behavior in MariaDB 10.1
To use another default character set, MariaDB Connector/C has to be build
with CMake parameter -DDEFAUT_CHARSET=name.
This commit is contained in:
Georg Richter
2018-05-24 12:10:02 +02:00
parent a12a0b8362
commit 8455b6e1c9
5 changed files with 22 additions and 12 deletions

View File

@@ -1365,12 +1365,13 @@ static int test_conc315(MYSQL *mysql)
return SKIP;
mysql_get_optionv(mysql, MYSQL_SET_CHARSET_NAME, (void *)&csname);
FAIL_UNLESS(strcmp(csname, "utf8") == 0, "Wrong default character set");
diag("csname=%s", csname);
FAIL_UNLESS(strcmp(csname, MARIADB_DEFAULT_CHARSET) == 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, (void *)&csname);
FAIL_UNLESS(strcmp(csname, "utf8") == 0, "Wrong default character set");
FAIL_UNLESS(strcmp(csname, MARIADB_DEFAULT_CHARSET) == 0, "Wrong default character set");
return OK;
}
#ifndef WIN32
@@ -1491,7 +1492,7 @@ struct my_tests_st my_tests[] = {
{"test_conc327", test_conc327, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_conc317", test_conc317, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
#endif
{"test_conc315", test_conc315, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
{"test_conc315", test_conc315, TEST_CONNECTION_NEW, 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},