From 110bc32b256eba2d6a28f853172ee81e5e60816c Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Fri, 2 Aug 2019 09:42:49 +0300 Subject: [PATCH] MXS-2621 Fix broken authorization SQL --- server/modules/authenticator/MySQLAuth/mysql_auth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/authenticator/MySQLAuth/mysql_auth.h b/server/modules/authenticator/MySQLAuth/mysql_auth.h index f278ce1a0..a4ad9bc7d 100644 --- a/server/modules/authenticator/MySQLAuth/mysql_auth.h +++ b/server/modules/authenticator/MySQLAuth/mysql_auth.h @@ -71,7 +71,7 @@ static const char mysqlauth_validate_user_query[] = static const char mysqlauth_validate_user_query_lower[] = "SELECT password FROM " MYSQLAUTH_USERS_TABLE_NAME " WHERE user = '%s' AND ( '%s' = host OR '%s' LIKE host)" - " AND (anydb = '1' OR LOWER('%s') IN ('', 'information_schema') OR LOWER('%s') LIKE LOWER(db)" + " AND (anydb = '1' OR LOWER('%s') IN ('', 'information_schema') OR LOWER('%s') LIKE LOWER(db))" " LIMIT 1"; /** Query that only checks if there's a matching user */