
SQL: Data truncation: Data too long for column 'name'
grous0 opened this issue ยท 26 comments
What steps will reproduce the problem?
- Use MariaDB and configure Towny to use it.
- Start the server with Towny plugin enabled.
What is the expected output?
[06:50:48 WARN]: [Towny] SQL: Data truncation: Data too long for column 'name' at row 1 --> a very long SQL code
Towny version
towny-0.99.2.5
Server version
PaperMC 1.19.4 build 550
Please use Pastebin.com to link the following files
Sorry but Pastebin.com is banned on my country so i using different provider.
- Your full server startup from the logs\latest.log:
https://paste.ee/p/8CzRb - Your Towny config.yml:
https://paste.ee/p/pzzu0 - Your townyperms.yml:
https://paste.ee/p/rL8aB - Your log's error:
[06:50:48 WARN]: [Towny] SQL: Data truncation: Data too long for column 'name' at row 1 --> a very long SQL code
(optional) If this is to do with permissions,
9. Your permissions file:
(optional) If this is to do with chat,
10. Your chatconfig.yml:
11. Your channels.yml:
https://cdn.discordapp.com/attachments/669247087329673228/1125484951161282561/towny-0.99.2.6.jar
Please confirm that this build fixes the issue.
Having the same issue on 0.99.5.0.
Now i have a weirder SQL error,
[09:57:11 WARN]: [Towny] SQL: Data truncation: Incorrect string value: '\xC5\x9Fi Do...' for column
townydb.
TOWNY_WORLDS.
unclaimedZoneName at row 1 --> HikariProxyPreparedStatement@1094861052 wrapping com.mysql.cj.jdbc.ServerPreparedStatement[149]: REPLACE INTO TOWNY_WORLDS (
plotManagementWildRegenSpeed,
isDeletingEntitiesOnUnclaim,
metadata,
PlotManagementWildRegenBlocks,
friendlyFire,
unclaimedZoneItemUse,
usingPlotManagementMayorDelete,
plotManagementIgnoreIds,
unclaimedZoneSwitch,
uuid,
plotManagementMayorDelete,
revertOnUnclaimWhitelistMaterials,
forceexplosions,
unclaimDeleteEntityTypes,
forcetownmobs,
usingPlotManagementWildRegen,
PlotManagementWildRegenBlockWhitelist,
claimable,
explosions,
usingPlotManagementWildRegenBlocks,
warAllowed,
unclaimedZoneName,
firespread,
forcepvp,
disablecreaturetrample,
unclaimedZoneBuild,
usingPlotManagementDelete,
pvp,
wildernessmobs,
usingTowny,
usingPlotManagementRevert,
unclaimedZoneIgnoreIds,
name,
plotManagementDeleteIds,
PlotManagementWildRegenEntities,
worldmobs,
forcefirespread,
endermanprotect,
unclaimedZoneDestroy) VALUES (** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **,** NOT SPECIFIED **)
it is default, i did not specified anything while creating the db,
?verifyServerCertificate=false&useSSL=false&useUnicode=true&characterEncoding=utf-8 also these are the flags.
@grousk what character encoding did you choose for your mysql db?
your towny/data/worlds/WORLDNAME.txt files will have a unclaimed_zone_name or similar entry, I want to know what you've named each of your worlds' wilderness.
- name: wilds
cost: 0.0
tax: 0.0
mapKey: W
itemUseIds: ''
switchIds: ''
allowedBlocks:
sorry, this will be in your mysql database, it would also be useful to know what you've got in your config, attach your config as well
SELECT * FROM TOWNY_WORLDS; is returning Empty set (0.000 sec),
looks like the default is never set in the config, so its whatever you chose to make the wilderness named.
unclaimedZoneName
from your initial error message. You might want to not use MySQL if you're needing support for this.
these? i set these with permissions, i cant find anything named "unclaimedZoneName".
unclaimed:
Can players build with any block in the wilderness?
unclaimed_zone_build: 'true'
Can player destroy any block in the wilderness?
unclaimed_zone_destroy: 'true'
Can players use items listed in the above protection.item_use_ids in the wilderness without restriction?
unclaimed_zone_item_use: 'true'
Can players interact with switch blocks listed in the above protection.switch_ids in the wilderness without restriction?
unclaimed_zone_switch: 'true'
A list of blocks that will bypass the above settings and do not require the towny.wild.* permission node.
These blocks are also used in determining which blocks can be interacted with in Towny Wilds plots in towns.
unclaimed_zone_ignore: ''
Talk to your host. This is above my paygrade. When you figure out what you put as a wilderness name I'll check it out.