mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 19:47:49 +01:00
Made MySQL launch options regex more lenient
Affects issues: - Fixed #1661
This commit is contained in:
parent
5401aef681
commit
306e30e21f
@ -94,7 +94,7 @@ public class MySQLDB extends SQLDB {
|
||||
String database = config.get(DatabaseSettings.MYSQL_DATABASE);
|
||||
String launchOptions = config.get(DatabaseSettings.MYSQL_LAUNCH_OPTIONS);
|
||||
// REGEX: match "?", match "word=word&" *-times, match "word=word"
|
||||
if (launchOptions.isEmpty() || !launchOptions.matches("\\?((\\w*=\\w*)&)*(\\w*=\\w*)")) {
|
||||
if (launchOptions.isEmpty() || !launchOptions.matches("\\?(((\\w|[-])+=.+)&)*((\\w|[-])+=.+)")) {
|
||||
launchOptions = "?rewriteBatchedStatements=true&useSSL=false";
|
||||
logger.error(locale.getString(PluginLang.DB_MYSQL_LAUNCH_OPTIONS_FAIL, launchOptions));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user