MXS-3064: Use latin1 charset

This prevents the server from selecting the charset under which the
queries are processed which can result in conflicts if the tables used are
not compatible with the charset of the string literals used in the query.
This commit is contained in:
Markus Mäkelä 2020-07-03 09:08:22 +03:00
parent 4fe71b41ed
commit 6c9249131f
No known key found for this signature in database
GPG Key ID: 5CE746D557ACC499

View File

@ -102,6 +102,12 @@ MYSQL* mxs_mysql_real_connect(MYSQL* con, SERVER* server, const char* user, cons
}
}
if (mysql && mysql_query(mysql, "SET NAMES latin1") != 0)
{
MXS_ERROR("Failed to set latin1 character set: %s", mysql_error(mysql));
mysql = NULL;
}
if (mysql)
{
/** Copy the server charset */