Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29110

Changing tables charset to utf8mb4 result in "Specified key is too long" errors

    XMLWordPrintable

    Details

      Description

      Performing the steps described in https://github.com/ezsystems/ezpublish-kernel/blob/5f2a94517267298fba58e066420107d112721bd3/doc/upgrade/7.2.md#mysqlmariadb-database-tables-character-set-change (also described in patch EZPESU-2018-003-KERNEL5.4) on DBMS MySQL 5.6 or lower (MySQL 5.7 is not affected) result in the following warnings on some of the tables (for example ezbasket):

      1 row(s) affected, 1 warning(s): 1071 Specified key was too long; max key length is 767 bytes Records: 1  Duplicates: 0  Warnings: 1
      

      The warnings can become errors in some cases (this probably depends on configuration).
      The reason for this is that the following script: https://github.com/ezsystems/ezpublish-kernel/blob/5f2a94517267298fba58e066420107d112721bd3/data/update/mysql/dbupdate-7.1.0-to-7.2.0.sql doesn't cover all the indexes that need to be shortened.

      Steps to reproduce

      1. Prepare new eZ Publish/eZ Platform installation with a clean database. Use MySQL 5.6 or lower.
      2. Perform the steps described in https://github.com/ezsystems/ezpublish-kernel/blob/5f2a94517267298fba58e066420107d112721bd3/doc/upgrade/7.2.md#mysqlmariadb-database-tables-character-set-change
      3. The warning described above will appear for some of the tables when executing the following query:
        ALTER TABLE tbl_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
        

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jacek.foremski-obsolete@ez.no Jacek Foremski (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: