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

@ -157,4 +157,11 @@ void mxs_mysql_set_log_statements(bool enable);
*/
bool mxs_mysql_get_log_statements();
/**
* Get default server character set
*
* @return The numeric identifier of `@@global.character_set_server`
*/
uint8_t mxs_mysql_get_character_set(MYSQL* mysql);
MXS_END_DECLS