Improve detection of problems caused by MDEV-13453

Instead of looking at the server version, the actual error message should
be inspected. This guarantees that the correct error message is logged
even with custom builds.
This commit is contained in:
Markus Mäkelä 2018-10-26 15:17:38 +03:00
parent 7e21e3aedd
commit 2594a0d913
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -863,8 +863,7 @@ static bool roles_are_available(MYSQL* conn, SERVICE* service, SERVER* server)
static void report_mdev13453_problem(MYSQL *con, SERVER *server)
{
if (server->version >= 100200 && server->version < 100211 &&
mxs_pcre2_simple_match("SELECT command denied to user .* for table 'users'",
if (mxs_pcre2_simple_match("SELECT command denied to user .* for table 'users'",
mysql_error(con), 0, NULL) == MXS_PCRE2_MATCH)
{
char user[256] = "<failed to query user>"; // Enough for all user-hostname combinations