From ed4200b23f82216c77873f72bc04b9119e48552d Mon Sep 17 00:00:00 2001 From: HarvelsX <90945793+HarvelsX@users.noreply.github.com> Date: Mon, 25 Jul 2022 12:12:44 +0300 Subject: [PATCH] Fix column check: https://github.com/AuthMe/AuthMeReloaded/issues/2543; --- src/main/java/fr/xephi/authme/datasource/MySQL.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/datasource/MySQL.java b/src/main/java/fr/xephi/authme/datasource/MySQL.java index 465084a11..5eb188788 100644 --- a/src/main/java/fr/xephi/authme/datasource/MySQL.java +++ b/src/main/java/fr/xephi/authme/datasource/MySQL.java @@ -299,7 +299,7 @@ public class MySQL extends AbstractSqlDataSource { } private boolean isColumnMissing(DatabaseMetaData metaData, String columnName) throws SQLException { - try (ResultSet rs = metaData.getColumns(null, null, tableName, columnName)) { + try (ResultSet rs = metaData.getColumns(database, null, tableName, columnName)) { return !rs.next(); } } @@ -348,6 +348,11 @@ public class MySQL extends AbstractSqlDataSource { return false; } + @Override + String getJdbcUrl(String host, String port, String database) { + return "jdbc:mysql://" + host + ":" + port + "/" + database; + } + @Override public Set getRecordsToPurge(long until) { Set list = new HashSet<>();