MySQL SYS_DB_CHANGELOG primary key too long

This is related to https://www.cuba-platform.com/discuss/t/mysql-create-db-script, which is marked ‘fixed’, but only if you’re not using multibyte characters (utf8mb4) as default encoding. The varchar(255) will overrun the max key size of 767 bytes in utf8. See: http://stackoverflow.com/questions/6172798/mysql-varchar255-utf8-is-too-long-for-key-but-max-length-is-1000-bytes

Here are the details:


Download https://repo.cuba-platform.com/content/groups/work/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38.jar
Table SYS_DB_CHANGELOG does not exist, running all init scripts
Failed to execute: create table SYS_DB_CHANGELOG (SCRIPT_NAME varchar(255) not null primary key, CREATE_TS datetime default current_timestamp, IS_INIT integer default 0) because: Specified key was too long; max key length is 767 bytes

innodb_version  5.6.31
protocol_version    10
slave_type_conversions  
version 5.6.31-log
version_comment MySQL Community Server (GPL)
version_compile_machine x86_64
version_compile_os  Linux

The fix will appear in next bugfix release. We’ll decrease the length of the primary key to support charsets with 4 bytes per character.

:ticket: See the following issue in our bug tracker:

https://youtrack.cuba-platform.com/issue/PL-8879