Search code examples
orbeon

Unable to upgrade to the latest version of Orbeon forms (2019.1 CE)


I am trying to upgrade Orbeon forms from version 2017.2 CE to the latest one (2019.1 CE) using a MariaDB (10.1) relational database and I'm getting the following error message when I run the upgrade scripts:

Specified key was too long; max key length is 767 bytes

I suppose that this is caused by the fact that the indexes that are to be created contain multiple fields with VARCHAR(255) using the collation utf8mb4.

In this case, is there any available workaround?


Solution

  • You're correct: this is due to a combination of the indexes containing multiple strings, utf8mb4 now being used to store text, and the version of MariaDB you are on limiting the size of the max key length to 767 bytes. You can solve this issue either by:

    • Upgrading MariaDB. On the MySQL side, the key prefix length limit is 3072 bytes for InnoDB tables since MySQL 5.7, initially released about 4 years ago as of this writing (October 21, 2015). I'm not sure when (or even if) that change made it to MariaDB. Hopefully you can find this information, and I'd recommend you explore this option first.
    • Changing the DDL that ships with Orbeon Forms to use utf8 character set instead of utf8mb4.

    For more on this, see the first bullet point in the MySQL versions section.