|
|
|
|
@ -96,7 +96,13 @@ int main(int argc, char** argv) {
|
|
|
|
|
|
|
|
|
|
if (mysql_query(mysql, "set names utf8mb4 collate utf8mb4_croatian_ci")) return exit_status();
|
|
|
|
|
show_variable(mysql, var_collation_connection, var_value);
|
|
|
|
|
ok(var_value.compare("utf8mb4_croatian_ci") == 0, "Collation >255 is set");
|
|
|
|
|
std::string version;
|
|
|
|
|
get_server_version(mysql, version);
|
|
|
|
|
if (version[0] == '5') {
|
|
|
|
|
ok(var_value.compare("utf8mb4_general_ci") == 0, "Backend is mysql version < 8.0. Collation is reduced to utf8mb4_general_ci as expected");
|
|
|
|
|
} else {
|
|
|
|
|
ok(var_value.compare("utf8mb4_croatian_ci") == 0, "Backend is mysql version >= 8.0. Collation is set as expected to utf8mb4_croatian_ci");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mysql_close(mysql);
|
|
|
|
|
|
|
|
|
|
@ -126,7 +132,6 @@ int main(int argc, char** argv) {
|
|
|
|
|
if (!mysql_b) return exit_status();
|
|
|
|
|
if (!mysql_real_connect(mysql_b, cl.host, cl.username, cl.password, NULL, cl.port, NULL, 0)) return exit_status();
|
|
|
|
|
|
|
|
|
|
std::string version;
|
|
|
|
|
get_server_version(mysql_b, version);
|
|
|
|
|
if (version[0] == '5') {
|
|
|
|
|
show_variable(mysql_b, var_collation_connection, var_value);
|
|
|
|
|
|