MXS-2335: Fix lower_case_table_names

The database check always used the case-sensitive SQL to check that the
database exists.
This commit is contained in:
Markus Mäkelä
2019-02-18 13:03:44 +02:00
parent 966787e119
commit 8a0b6005a4
2 changed files with 9 additions and 4 deletions

View File

@ -81,6 +81,8 @@ static const char mysqlauth_skip_auth_query[] =
/** Query that checks that the database exists */
static const char mysqlauth_validate_database_query[] =
"SELECT * FROM " MYSQLAUTH_DATABASES_TABLE_NAME " WHERE db = '%s' LIMIT 1";
static const char mysqlauth_validate_database_query_lower[] =
"SELECT * FROM " MYSQLAUTH_DATABASES_TABLE_NAME " WHERE LOWER(db) = LOWER('%s') LIMIT 1";
/** Delete query used to clean up the database before loading new users */
static const char delete_users_query[] = "DELETE FROM " MYSQLAUTH_USERS_TABLE_NAME;