CraftConomy

154k Downloads

Fail while creating database

Stalk3r77 opened this issue ยท 3 comments

commented

Hello,
I just finished the setup and when I do /money, this appears:
I have others servers where CraftConomy is fully fonctionnal.
I use MariaDB (MySQL): 10.1.23-MariaDB-9+deb9u1 - Debian 9.0

I tried using other spigot versions and other versions of CraftConomy but it never worked.
I also tried running the server only with CraftConomy, Vault and ProtocolLib to avoid plugins conflict.

It creates only 3 tables:
cc3

Here are the console logs:
https://pastebin.com/3x8QGCRX

Do you have an idea how to fix this?
Thanks in advance!

commented

Same issue here, using 10.1.23-MariaDB-9+deb9u1 - Debian 9.0

Missing tables, only 3 tables get created.

I believe this error is related to creating the cc3_worldgroup table (it's the 4th table that is initialilzed) and is related to the UTF-8 change

[20:49:40] [Server thread/WARN]: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
[20:49:40] [Server thread/WARN]:        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[20:49:40] [Server thread/WARN]:        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[20:49:40] [Server thread/WARN]:        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[20:49:40] [Server thread/WARN]:        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.Util.getInstance(Util.java:408)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2490)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2079)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2013)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5104)
[20:49:40] [Server thread/WARN]:        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1998)
[20:49:40] [Server thread/WARN]:        at com.greatmancode.com.zaxxer.libs.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
[20:49:40] [Server thread/WARN]:        at com.greatmancode.com.zaxxer.libs.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
[20:49:40] [Server thread/WARN]:        at com.greatmancode.craftconomy3.storage.sql.MySQLEngine.<init>(MySQLEngine.java:71)
[20:49:40] [Server thread/WARN]:        at com.greatmancode.craftconomy3.storage.StorageHandler.<init>(StorageHandler.java:40)
[20:49:40] [Server thread/WARN]:        at com.greatmancode.craftconomy3.Common.initialiseDatabase(Common.java:397)
[20:49:40] [Server thread/WARN]:        at com.greatmancode.craftconomy3.commands.setup.NewSetupDatabaseCommand.mysql(NewSetupDatabaseCommand.java:140)
[20:49:40] [Server thread/WARN]:        at com.greatmancode.craftconomy3.commands.setup.NewSetupDatabaseCommand.execute(NewSetupDatabaseCommand.java:48)
[20:49:40] [Server thread/WARN]:        at com.greatmancode.craftconomy3.tools.commands.SubCommand.execute(SubCommand.java:69)
[20:49:40] [Server thread/WARN]:        at com.greatmancode.craftconomy3.tools.commands.bukkit.BukkitCommandReceiver.onCommand(BukkitCommandReceiver.java:51)
[20:49:40] [Server thread/WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
[20:49:40] [Server thread/WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141)
[20:49:40] [Server thread/WARN]:        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:645)
[20:49:40] [Server thread/WARN]:        at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1385)
[20:49:40] [Server thread/WARN]:        at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1220)
[20:49:40] [Server thread/WARN]:        at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)
[20:49:40] [Server thread/WARN]:        at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:1)
[20:49:40] [Server thread/WARN]:        at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13)
[20:49:40] [Server thread/WARN]:        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[20:49:40] [Server thread/WARN]:        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[20:49:40] [Server thread/WARN]:        at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)
[20:49:40] [Server thread/WARN]:        at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:747)
[20:49:40] [Server thread/WARN]:        at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:405)
[20:49:40] [Server thread/WARN]:        at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:678)
[20:49:40] [Server thread/WARN]:        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:576)
[20:49:40] [Server thread/WARN]:        at java.lang.Thread.run(Thread.java:748)

commented

It's definitely the UTF-8 changes.
We are very close to the limit of key length.
It may be an issue of MariaDB, and i heard about a potential fix in 10.2, maybe this will help ?
Otherwise it should work because utf8 is 3 characters size at maximum so 3*255 = 765 < 767 for the key total length.
Is someone else experiencing this issue with anything different than MariaDB ?

commented

I have the same problem, can you send me the tables in sql ?
So i can create the tables manuel