Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Bug Migrating from version 10 to 11 #11

Closed
cupang-afk opened this issue Mar 11, 2023 · 4 comments
Closed

SQL Bug Migrating from version 10 to 11 #11

cupang-afk opened this issue Mar 11, 2023 · 4 comments

Comments

@cupang-afk
Copy link

hello, i would like to introduce a bug

[18:42:42 INFO]: [AuxProtect] Connecting to database...
[18:42:42 INFO]: [AuxProtect] Outdated DB Version: 10. Migrating to version: 11...
[18:42:42 INFO]: [AuxProtect] This may take a while. Please do not interrupt.
[18:42:42 INFO]: [AuxProtect] Migrating to v11, performing pre-table migration... DO NOT INTERRUPT
[18:42:42 INFO]: [AuxProtect] Migrating to v11 pre-table migration complete.
[18:42:42 WARN]: [AuxProtect] Error while migrating database. This database will likely not work with the current version. You will need to restore a backup (plugins/AuxProtect/database/backups) and try again. Please contact the plugin developer if you are unable to complete migration.
[18:42:42 WARN]: [AuxProtect] Unknown data type: 'BYTE'
java.sql.SQLException: Unknown data type: 'BYTE'
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.29.jar:8.0.29]
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.29.jar:8.0.29]
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916) ~[mysql-connector-java-8.0.29.jar:8.0.29]
	at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:354) ~[mysql-connector-java-8.0.29.jar:8.0.29]
	at dev.heliosares.auxprotect.database.ConnectionPool.execute(ConnectionPool.java:275) ~[AuxProtectBungee-LATEST-[1.2.5].jar:?]
	at dev.heliosares.auxprotect.database.SQLManager.init(SQLManager.java:218) ~[AuxProtectBungee-LATEST-[1.2.5].jar:?]
	at dev.heliosares.auxprotect.database.ConnectionPool.init(ConnectionPool.java:123) ~[AuxProtectBungee-LATEST-[1.2.5].jar:?]
	at dev.heliosares.auxprotect.database.SQLManager.connect(SQLManager.java:118) ~[AuxProtectBungee-LATEST-[1.2.5].jar:?]
	at dev.heliosares.auxprotect.spigot.AuxProtectSpigot$1.run(AuxProtectSpigot.java:188) ~[AuxProtectBungee-LATEST-[1.2.5].jar:?]
	at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.3.jar:git-Purpur-1927]
	at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.19.3.jar:git-Purpur-1927]
	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.19.3.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
	at java.lang.Thread.run(Thread.java:1589) ~[?:?]
[18:42:42 ERROR]: [AuxProtect] Failed to connect to SQL database. Disabling.
[18:42:42 INFO]: [AuxProtect] Logging final entries... (If you are reloading the plugin, this may cause lag)
[18:42:42 WARN]: [AuxProtect] Plugin AuxProtect v1.2.5 generated an exception while executing task 16198
java.lang.RuntimeException: java.lang.IllegalStateException: Not yet initialized
	at dev.heliosares.auxprotect.database.ConnectionPool.executeReturn(ConnectionPool.java:212) ~[AuxProtectBungee-LATEST-[1.2.5].jar:?]
	at dev.heliosares.auxprotect.database.ConnectionPool.execute(ConnectionPool.java:190) ~[AuxProtectBungee-LATEST-[1.2.5].jar:?]
	at dev.heliosares.auxprotect.spigot.AuxProtectSpigot.onDisable(AuxProtectSpigot.java:577) ~[AuxProtectBungee-LATEST-[1.2.5].jar:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[purpur-api-1.19.3-R0.1-SNAPSHOT.jar:?]
	at dev.heliosares.auxprotect.spigot.AuxProtectSpigot.access$000(AuxProtectSpigot.java:41) ~[AuxProtectBungee-LATEST-[1.2.5].jar:?]
	at dev.heliosares.auxprotect.spigot.AuxProtectSpigot$1.run(AuxProtectSpigot.java:192) ~[AuxProtectBungee-LATEST-[1.2.5].jar:?]
	at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.3.jar:git-Purpur-1927]
	at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.19.3.jar:git-Purpur-1927]
	at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.19.3.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
	at java.lang.Thread.run(Thread.java:1589) ~[?:?]
Caused by: java.lang.IllegalStateException: Not yet initialized
	at dev.heliosares.auxprotect.database.ConnectionPool.executeReturnException(ConnectionPool.java:224) ~[AuxProtectBungee-LATEST-[1.2.5].jar:?]
	at dev.heliosares.auxprotect.database.ConnectionPool.executeReturn(ConnectionPool.java:208) ~[AuxProtectBungee-LATEST-[1.2.5].jar:?]
	... 11 more

what im doing, im upgrading my mariadb server from 10.10 to 10.11
now is showing

mariadb  Ver 15.1 Distrib 10.11.2-MariaDB, for Linux (x86_64) using readline 5.1

also when i tried to connect to a dummy database called mc_auxprotect_dummy

it show the same error log as above with the only difference was there are no "migrating from 10 to 11" anywhere

[18:46:45 INFO]: [AuxProtect] Connecting to database...
[18:46:46 INFO]: [AuxProtect] Done migrating to version 11
and then error

it does create some of the table tho, but seems incomplete
image

other plugin that using the database server e.g SkinsRestorer, DiscordSRV, CoreProtect was fine

my server version

[18:54:23 INFO]: Current: git-Purpur-1927 (MC: 1.19.3)*
Previous: git-Purpur-1926 (MC: 1.19.3)
* You are running the latest version
@ks-hl
Copy link
Owner

ks-hl commented Mar 11, 2023

@cupang-afk
Copy link
Author

Try this https://github.com/Heliosares/AuxProtect/releases/tag/1.2.5.1-pre1

i can confirm that this is working

[Sun 17:41:31 INFO ] AuxProtect Loading server plugin AuxProtect v1.2.5.1-pre1
[Sun 17:41:31 INFO ] AuxProtect Enabling AuxProtect v1.2.5.1-pre1
[Sun 17:41:31 INFO ] AuxProtect No donor key
[Sun 17:41:31 INFO ] PM | The plugin has been loaded.
[Sun 17:41:31 INFO ] AuxProtect Connecting to database...
[Sun 17:41:35 INFO ] AuxProtect Connected!
[Sun 17:41:35 INFO ] AuxProtect Purging 'auxprotect_main'...
[Sun 17:41:35 INFO ] AuxProtect Purging 'auxprotect_spam'...
[Sun 17:41:35 INFO ] AuxProtect Purging 'auxprotect_xray'...
[Sun 17:41:35 INFO ] AuxProtect Purging 'auxprotect_inventory'...
[Sun 17:41:35 INFO ] AuxProtect Purging 'auxprotect_commands'...
[Sun 17:41:35 INFO ] AuxProtect Purging 'auxprotect_chat'...
[Sun 17:41:35 INFO ] AuxProtect Purging 'auxprotect_position'...
[Sun 17:41:35 INFO ] AuxProtect Purging 'auxprotect_towny'...
[Sun 17:41:35 INFO ] AuxProtect Purging 'auxprotect_api'...
[Sun 17:41:35 INFO ] AuxProtect Purging unused UIDs...
[Sun 17:41:35 INFO ] AuxProtect Purge complete. Purged 0 rows.
[Sun 17:41:35 INFO ] AuxProtect There are currently 0 rows

@cupang-afk
Copy link
Author

cupang-afk commented Mar 13, 2023

im gonna add this because i think it still related

what i do is trying to restore a player inventory

[Mon 08:36:34 WARN ] AuxProtect Data truncation: Truncated incorrect DOUBLE value: ''
    com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: ''
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104)
    at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916)
    at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:354)
    at AuxProtect.jar//dev.heliosares.auxprotect.database.ConnectionPool.execute(ConnectionPool.java:275)
    at AuxProtect.jar//dev.heliosares.auxprotect.database.ConnectionPool.lambda$execute$2(ConnectionPool.java:265)
    at AuxProtect.jar//dev.heliosares.auxprotect.database.ConnectionPool.lambda$execute$1(ConnectionPool.java:191)
    at AuxProtect.jar//dev.heliosares.auxprotect.database.ConnectionPool.executeReturnException(ConnectionPool.java:242)
    at AuxProtect.jar//dev.heliosares.auxprotect.database.ConnectionPool.executeReturn(ConnectionPool.java:208)
    at AuxProtect.jar//dev.heliosares.auxprotect.database.ConnectionPool.execute(ConnectionPool.java:190)
    at AuxProtect.jar//dev.heliosares.auxprotect.database.ConnectionPool.execute(ConnectionPool.java:265)
    at AuxProtect.jar//dev.heliosares.auxprotect.core.commands.InvCommand.update(InvCommand.java:188)
    at AuxProtect.jar//dev.heliosares.auxprotect.core.commands.InvCommand.lambda$makeInventory$2(InvCommand.java:74)
    at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftTask.run(CraftTask.java:101)
    at org.bukkit.craftbukkit.v1_19_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    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:1589)

viewing the menu are okay tho
image

sorry for the inconvenience, if you need me to test anything im glad to help

@ks-hl
Copy link
Owner

ks-hl commented Mar 13, 2023

Original issue resolved, new issue moved to [#12]

@ks-hl ks-hl closed this as completed Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants