You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While attempting to setup AuxProtect for a new server with a MySQL backend, I encountered two issues I'd like to bring to your attention.
First, during UID Purge, it appears that the query used to execute the purge does not take into account table prefixes. I received the following error:
[WARN]: [AuxProtect] Table '[REDACTED].auxprotect_uids' doesn't exist
java.sql.SQLSyntaxErrorException: Table '[REDACTED].auxprotect_uids' doesn't exist
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:112) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:113) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:938) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1106) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1045) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1369) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1030) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.database.ConnectionPool.executeReturnRows(ConnectionPool.java:323) ~[AuxProtect-1.3.2.jar:?]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.database.SQLManager.lambda$purgeUIDs$0(SQLManager.java:338) ~[AuxProtect-1.3.2.jar:?]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.database.ConnectionPool.executeReturnException(ConnectionPool.java:254) ~[AuxProtect-1.3.2.jar:?]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.database.ConnectionPool.executeReturn(ConnectionPool.java:227) ~[AuxProtect-1.3.2.jar:?]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.database.SQLManager.purgeUIDs(SQLManager.java:321) ~[AuxProtect-1.3.2.jar:?]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.database.SQLManager.connect(SQLManager.java:163) ~[AuxProtect-1.3.2.jar:?]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.spigot.AuxProtectSpigot$1.run(AuxProtectSpigot.java:228) ~[AuxProtect-1.3.2.jar:?]
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86) ~[paper-1.21.1.jar:1.21.1-38-e4b38b4]
at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.21.1.jar:1.21.1-38-e4b38b4]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(Server SchedulerReportingWrapper.java:22) ~[paper-1.21.1.jar:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
I believe the offending line of code can be found here.
After deleting the newly created tables and removing the table prefix, I attempted to setup the plugin again with the same MySQL backend. I then encountered the following error:
[WARN]: [AuxProtect] You can't specify target table 'auxprotect_uids' for update in FROM clause
java.sql.SQLException: You can't specify target table 'auxprotect_uids' for update in FROM clause
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:121) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:113) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:938) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1106) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1045) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1369) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1030) ~[mysql-connector-j-8.4.0.jar:8.4.0]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.database.ConnectionPool.executeReturnRows(ConnectionPool.java:323) ~[AuxProtect-1.3.2.jar:?]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.database.SQLManager.lambda$purgeUIDs$0(SQLManager.java:338) ~[AuxProtect-1.3.2.jar:?]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.database.ConnectionPool.executeReturnException(ConnectionPool.java:254) ~[AuxProtect-1.3.2.jar:?]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.database.ConnectionPool.executeReturn(ConnectionPool.java:227) ~[AuxProtect-1.3.2.jar:?]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.database.SQLManager.purgeUIDs(SQLManager.java:321) ~[AuxProtect-1.3.2.jar:?]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.database.SQLManager.connect(SQLManager.java:163) ~[AuxProtect-1.3.2.jar:?]
at AuxProtect-1.3.2.jar/dev.heliosares.auxprotect.spigot.AuxProtectSpigot$1.run(AuxProtectSpigot.java:228) ~[AuxProtect-1.3.2.jar:?]
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86) ~[paper-1.21.1.jar:1.21.1-38-e4b38b4]
at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.21.1.jar:1.21.1-38-e4b38b4]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.21.1.jar:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
I believe the issue resides in the same line of code above, but is a syntax issue of some sort.
As much as I would have loved to have created a PR myself, my Java skills are severely lacking. Please let me know if there are any other details I can provide.
The text was updated successfully, but these errors were encountered:
While attempting to setup AuxProtect for a new server with a MySQL backend, I encountered two issues I'd like to bring to your attention.
First, during UID Purge, it appears that the query used to execute the purge does not take into account table prefixes. I received the following error:
I believe the offending line of code can be found here.
After deleting the newly created tables and removing the table prefix, I attempted to setup the plugin again with the same MySQL backend. I then encountered the following error:
I believe the issue resides in the same line of code above, but is a syntax issue of some sort.
As much as I would have loved to have created a PR myself, my Java skills are severely lacking. Please let me know if there are any other details I can provide.
The text was updated successfully, but these errors were encountered: