Before I submit a ticket... What's this?


#1

So I recently got around to setting up a Sponge server, and I'm confused by this error because I don't have a way to change the names of the default Nether world. It then throws up this error with RedProtect plugin trying to register a database. Does this merit a ticket or is there an obvious solution that I'm missing? I should be able to change the name easily somewhere right...

[01:05:53 ERROR] [STDERR]: java.sql.SQLSyntaxErrorException: (conn:1755) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1
Query is : CREATE DATABASE redprotect_DIM-1
[01:05:53 ERROR] [STDERR]: at org.mariadb.jdbc.internal.util.ExceptionMapper.get(ExceptionMapper.java:134)
[01:05:53 ERROR] [STDERR]: at org.mariadb.jdbc.internal.util.ExceptionMapper.getException(ExceptionMapper.java:101)
[01:05:53 ERROR] [STDERR]: at org.mariadb.jdbc.internal.util.ExceptionMapper.throwAndLogException(ExceptionMapper.java:77)
[01:05:53 ERROR] [STDERR]: at org.mariadb.jdbc.MariaDbStatement.executeQueryEpilog(MariaDbStatement.java:224)
[01:05:53 ERROR] [STDERR]: at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:258)
[01:05:53 ERROR] [STDERR]: at org.mariadb.jdbc.MariaDbStatement.executeUpdate(MariaDbStatement.java:387)
[01:05:53 ERROR] [STDERR]: at br.net.fabiozumbi12.redprotect.WorldMySQLRegionManager.(WorldMySQLRegionManager.java:54)
[01:05:53 ERROR] [STDERR]: at br.net.fabiozumbi12.redprotect.RegionManager.loadAll(RegionManager.java:32)
[01:05:53 ERROR] [STDERR]: at br.net.fabiozumbi12.redprotect.RedProtect.onServerStart(RedProtect.java:88)
[01:05:53 ERROR] [STDERR]: at org.spongepowered.common.event.listener.GameStartedServerEventListener_RedProtect_onServerStart64.handle(Unknown Source)
[01:05:53 ERROR] [STDERR]: at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95)
[01:05:53 ERROR] [STDERR]: at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:305)
[01:05:53 ERROR] [STDERR]: at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:319)
[01:05:53 ERROR] [STDERR]: at org.spongepowered.common.event.SpongeEventManager.post(SpongeEventManager.java:323)
[01:05:53 ERROR] [STDERR]: at org.spongepowered.common.SpongeImpl.postState(SpongeImpl.java:188)
[01:05:53 ERROR] [STDERR]: at org.spongepowered.server.SpongeVanilla.onServerStarting(SpongeVanilla.java:166)
[01:05:53 ERROR] [STDERR]: at net.minecraft.server.dedicated.DedicatedServer.handler$callServerStarting$zob000(SourceFile:1249)
[01:05:53 ERROR] [STDERR]: at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(SourceFile:229)
[01:05:53 ERROR] [STDERR]: at net.minecraft.server.MinecraftServer.run(SourceFile:436)
[01:05:53 ERROR] [STDERR]: at java.lang.Thread.run(Unknown Source)
[01:05:53 ERROR] [STDERR]: Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1
Query is : CREATE DATABASE redprotect_DIM-1
[01:05:53 ERROR] [STDERR]: at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(AbstractQueryProtocol.java:1114)
[01:05:53 ERROR] [STDERR]: at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:137)
[01:05:53 ERROR] [STDERR]: at org.mariadb.jdbc.MariaDbStatement.executeInternal(MariaDbStatement.java:249)


#2

If I remember correctly, MariaDB cannot have characters like the - sign in database names.


#3

Ah, but I can't seem to change that name, can I??


#4

I do not know for sure, but I'm guessing you can't.

I'm pretty sure that the plugin author could create a check for invalid names and replace characters like the -,+,etc with an underscore.

I'm guessing that this is a valid reason for a ticket though.


#5

Hmm, should I be submitting this ticket to Sponge or to RedProtect though? It seems like a problem if Sponge creates names that will have MySQL conflicts.


#6

Um no... DIM-1 is a Minecraft name, so unless you want to file a complaint to Mojang..?

Rather, the author of redprotect needs to sanitize the data being sent to the connector, and make sure it's valid.


#7

Ah thanks for clarifying