WorldGuard

WorldGuard

8M Downloads

SQL: Failed to save the region data for 'world' during a periodical save

RalphORama opened this issue ยท 1 comments

commented

Versions

WorldEdit version:

[18:04:26 INFO]: FastAsyncWorldEdit-664 created by Empire92, MattBDev, IronApollo, dordsor21 and NotMyFault
[18:04:26 INFO]: FAWE version:
 - Date Apr 19, 2021, 12:00:00 AM
 - Commit f338a9ac
 - Build 664
 - Platform Bukkit

WorldGuard version: WorldGuard 7.0.4 / Bukkit-Official (7.0.4+f7ff984)

Platform version: Paper version git-Paper-607 (MC: 1.16.5)

Describe the bug

When I set a deny-spawn list for a region to prevent the spawning of hostile mobs, I start getting this error. I am denying about 31 entity types from spawning rather than setting mob-spawning DENY because I would still like passive mobs to spawn in the region.

After setting the deny-spawn list, I start getting errors in console about failing to save the region data to the database. This doesn't happen if I only set deny-spawn for a small list of mobs, I think I may be hitting some limit with database column size.

To Reproduce

  1. Enable SQL in the config
  2. Create region spawn in world world
  3. Run the command rg flag -w "world" spawn deny-spawn cave_spider,enderman,spider,blaze,creeper,drowned,elder_guardian,endermite,evoker,ghast,guardian,hoglin,husk,magma_cube,phantom,pillager,ravager,shulker,silverfish,skeleton,slime,stray,vex,vindicator,witch,wither_skeleton,wither,zoglin,zombie,zombie_villager,ender_dragon
  4. Errors start appearing in console.

Expected behavior

No errors occurring despite long deny-spawn lists.

Screenshots

[18:01:47 WARN]: [WorldGuard] Failed to save the region data for 'world' during a periodical save
com.sk89q.worldguard.protection.managers.storage.StorageException: Failed to save the region data to the database
        at com.sk89q.worldguard.protection.managers.storage.sql.SQLRegionDatabase.saveChanges(SQLRegionDatabase.java:270) ~[?:?]
        at com.sk89q.worldguard.protection.managers.RegionManager.saveChanges(RegionManager.java:134) ~[?:?]
        at com.sk89q.worldguard.protection.managers.RegionContainerImpl$BackgroundSaver.run(RegionContainerImpl.java:245) ~[?:?]
        at java.util.TimerThread.mainLoop(Timer.java:556) ~[?:?]
        at java.util.TimerThread.run(Timer.java:506) ~[?:?]
Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'value' at row 1
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
        at com.mysql.cj.util.Util.handleNewInstance(Util.java:192) ~[patched_1.16.5.jar:git-Paper-607]
        at com.mysql.cj.util.Util.getInstance(Util.java:167) ~[patched_1.16.5.jar:git-Paper-607]
        at com.mysql.cj.util.Util.getInstance(Util.java:174) ~[patched_1.16.5.jar:git-Paper-607]
        at com.mysql.cj.jdbc.exceptions.SQLError.createBatchUpdateException(SQLError.java:224) ~[patched_1.16.5.jar:git-Paper-607]
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchSerially(ClientPreparedStatement.java:853) ~[patched_1.16.5.jar:git-Paper-607]
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchInternal(ClientPreparedStatement.java:435) ~[patched_1.16.5.jar:git-Paper-607]
        at com.mysql.cj.jdbc.StatementImpl.executeBatch(StatementImpl.java:794) ~[patched_1.16.5.jar:git-Paper-607]
        at com.sk89q.worldguard.protection.managers.storage.sql.StatementBatch.executeRemaining(StatementBatch.java:50) ~[?:?]
        at com.sk89q.worldguard.protection.managers.storage.sql.RegionUpdater.replaceFlags(RegionUpdater.java:170) ~[?:?]
        at com.sk89q.worldguard.protection.managers.storage.sql.RegionUpdater.apply(RegionUpdater.java:331) ~[?:?]
        at com.sk89q.worldguard.protection.managers.storage.sql.DataUpdater.executeSave(DataUpdater.java:130) ~[?:?]
        at com.sk89q.worldguard.protection.managers.storage.sql.DataUpdater.saveChanges(DataUpdater.java:73) ~[?:?]
        at com.sk89q.worldguard.protection.managers.storage.sql.SQLRegionDatabase.saveChanges(SQLRegionDatabase.java:268) ~[?:?]
        ... 4 more
Caused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'value' at row 1
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104) ~[patched_1.16.5.jar:git-Paper-607]
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[patched_1.16.5.jar:git-Paper-607]
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1092) ~[patched_1.16.5.jar:git-Paper-607]
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchSerially(ClientPreparedStatement.java:832) ~[patched_1.16.5.jar:git-Paper-607]
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchInternal(ClientPreparedStatement.java:435) ~[patched_1.16.5.jar:git-Paper-607]
        at com.mysql.cj.jdbc.StatementImpl.executeBatch(StatementImpl.java:794) ~[patched_1.16.5.jar:git-Paper-607]
        at com.sk89q.worldguard.protection.managers.storage.sql.StatementBatch.executeRemaining(StatementBatch.java:50) ~[?:?]
        at com.sk89q.worldguard.protection.managers.storage.sql.RegionUpdater.replaceFlags(RegionUpdater.java:170) ~[?:?]
        at com.sk89q.worldguard.protection.managers.storage.sql.RegionUpdater.apply(RegionUpdater.java:331) ~[?:?]
        at com.sk89q.worldguard.protection.managers.storage.sql.DataUpdater.executeSave(DataUpdater.java:130) ~[?:?]
        at com.sk89q.worldguard.protection.managers.storage.sql.DataUpdater.saveChanges(DataUpdater.java:73) ~[?:?]
        at com.sk89q.worldguard.protection.managers.storage.sql.SQLRegionDatabase.saveChanges(SQLRegionDatabase.java:268) ~[?:?]
        ... 4 more

Additional context

commented

sql is unsupported