Fix CorrectWrongCharacterEncodingPatch failing on mysql.user table being a view

This commit is contained in:
Aurora Lahtela 2024-05-11 18:58:22 +03:00
parent 9e25f2b26c
commit ca9870d9fe

View File

@ -51,6 +51,8 @@ public class CorrectWrongCharacterEncodingPatch extends Patch {
if (dbType != DBType.MYSQL) return true;
correctionSqlQueries = query(getBadTableCorrectionQueries());
// Fix for MariaDB mysql.user table being a view
correctionSqlQueries.removeIf(sql -> sql.startsWith("ALTER TABLE `user`"));
return correctionSqlQueries.isEmpty();
}