ortuman/jackal

MySQL database schema import: Specified key was too long; max key length is 767 bytes

Closed this issue · 4 comments

When trying to import the MySQL schema for Jackal, my MySQL server reports an error:

root@jackal1 ~/golang/src/github.com/ortuman/jackal # mysql jackal < sql/mysql.sql 
ERROR 1071 (42000) at line 6: Specified key was too long; max key length is 767 bytes

Note that I'm not using the official Oracle MySQL, but MariaDB as a MySQL server. Since MariaDB is e.g. shipped with Debian by default, I think this issue should be investigated and compatibility should be provided in the future.

Maybe this issue from another Golang project is helpful? https://github.com/gogits/gogs/pull/4913/files

You are right Thomas! The SQL script has been written having only in mind MySQL 5.7... let's make it compatible with MariaDB. :)

Which version of MariaDB are you using @ThomasLeister?

Running the script with latest version (MariaDB 10.2.14) works fine. Could you please confirm?

With MariaDB 10.1 on Debian Stretch:

Package: mariadb-server
Source: mariadb-10.1
Version: 10.1.26-0+deb9u1

=> ERROR (as mentioned earlier)

With version 10.2 from the MariaDb Debian Stretch Repo (https://downloads.mariadb.org/mariadb/repositories/#mirror=hs-esslingen&distro=Debian&distro_release=stretch--stretch&version=10.2) it works! Can confirm! ✅

Great! I'll update README.md to make it clear. Thank you for reporting!