Towny Classic

Towny Classic

3.2k Downloads

SQL: Data truncation: Data too long for column 'name'

grous0 opened this issue ยท 26 comments

commented

What steps will reproduce the problem?

  1. Use MariaDB and configure Towny to use it.
  2. 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.

  1. Your full server startup from the logs\latest.log:
    https://paste.ee/p/8CzRb
  2. Your Towny config.yml:
    https://paste.ee/p/pzzu0
  3. Your townyperms.yml:
    https://paste.ee/p/rL8aB
  4. 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:

commented

Can you share the "very long sql code"

commented

Can you share the "very long sql code"

it is in latest.log.

commented

Having the same issue on 0.99.5.0.

gist

commented

tested with 0.99.5.0 works now. Sorry for delay.

commented

The linked PR hasn't been merged yet so long world names will still error out

commented

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 **)

commented

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.

commented

default is utf8_general_ci

commented

@grousk what character encoding did you choose for your mysql db?

commented

OK what did you name your wilderness zones?

commented

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.

commented

i think it default how can i check that?

commented
  • name: wilds
    cost: 0.0
    tax: 0.0
    mapKey: W
    itemUseIds: ''
    switchIds: ''
    allowedBlocks:
commented

there is no worlds directory.

commented

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

commented

SELECT * FROM TOWNY_WORLDS; is returning Empty set (0.000 sec),

here is the config

commented

unclaimed zone name or something.

commented

looks like the default is never set in the config, so its whatever you chose to make the wilderness named.

commented

Can you give me the line?

commented

unclaimedZoneName from your initial error message. You might want to not use MySQL if you're needing support for this.

commented

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: ''

commented

there nothing stored in it.

commented

Look at what is stored in your mysql TOWNY_WORLDS table

commented

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.

commented

somehow it got fixed,

i tried changing password these what a small special character.