piler 1.3.1 | MySQL 5.7 | ERROR 1071: Specified key was too long

Issue #886 resolved
Leo created an issue

Hello,

I have made a fresh installation of piler 1.3.1 (build 956) with MySQL 5.7.21. According to the FAQ (http://www.mailpiler.org/wiki/faq) you should use character set utf8mb4 and collate utf8mb4_unicode_ci. Therefore I modified the util/db-mysql-root.sql.in file for the post-installation task:

-create database MYSQL_DATABASE character set 'utf8';
+create database MYSQL_DATABASE character set 'utf8mb4' COLLATE 'utf8mb4_unicode_ci';

Executing make postinstall then triggers an error during table creation:

ERROR 1071 (42000): Specified key was too long; max key length is 3072 bytes

Due to the 4 byte character set the keys are too long. The following tables are affected:

  • archiving_rule
  • retention_rule
  • folder_rule

As far as I know it is not possible to raise the MySQL limit on keys. To work around this issue I have reduced the number of chars for some of the fields but I'm not sure if this has some other implications ...

Kind regards, Leo

Comments (3)

  1. Leo reporter

    Just noticed that you already fixed it in the source tree. Even noticed that there are git tags for newer releases 1.3.2 and 1.3.3. Would be great if you could update your download page http://www.mailpiler.org/wiki/download to prevent other users from getting this issue with the outdated release 1.3.1 ;-)

  2. Log in to comment