MXS-2899: Update charset only when successful

By updating the server charset only when we successfully query it, the
charset will not change due to network connectivity problems.
This commit is contained in:
Markus Mäkelä
2020-02-26 07:43:40 +02:00
parent 0614a44a4d
commit e180c20055
3 changed files with 9 additions and 11 deletions

View File

@ -158,10 +158,11 @@ void mxs_mysql_set_log_statements(bool enable);
bool mxs_mysql_get_log_statements();
/**
* Get default server character set
* Update default server character set from @@global.character_set_server
*
* @return The numeric identifier of `@@global.character_set_server`
* @param mysql The connection handle
* @param server The server to modify
*/
uint8_t mxs_mysql_get_character_set(MYSQL* mysql);
void mxs_update_server_charset(MYSQL* mysql, SERVER* server);
MXS_END_DECLS