MXS-2784: Use SQL to fetch default character set

The Connector-C was changed to always return only the client's charset,
not the actual charset that the connection ends up using. To cope with
this, the code has to use SQL to join the default character set name to
the default collation for it which can be used to extract the numeric ID
of the charset.
This commit is contained in:
Markus Mäkelä
2020-01-24 10:51:15 +02:00
parent 4641dc208f
commit a0affe1bb7
3 changed files with 37 additions and 6 deletions

View File

@ -701,9 +701,7 @@ static bool check_server_permissions(SERVICE* service,
}
/** Copy the server charset */
MY_CHARSET_INFO cs_info;
mysql_get_character_set_info(mysql, &cs_info);
server->charset = cs_info.number;
server->charset = mxs_mysql_get_character_set(mysql);
if (server->version_string[0] == 0)
{