Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-36135

Add support for 4 byte characters in MySQL connection

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for JIRA Cloud As we fully manage any storage and database for you, this issue is not valid for Jira Cloud. If you are using JIRA Server, please see the corresponding suggestion.

      Since MySQL 5.5+, there is support for 4 byte characters. JIRA is capable of handling these characters when using other databases. Due to some limitations in how MySQL is implemented, JIRA won't just work by setting the 4 byte encoding utf8mb4. MySQL's InnoDB engine is limited to a maximum size of 767 bytes for any field used in an index, and there are various places in JIRA that use a VARCHAR(255) field in an index. This means that JIRA will encounter an error such as the below if you try to simply install into an utf8mb4 database:

      2013-10-30 11:43:23,723 localhost-startStop-1 ERROR      [core.entity.jdbc.DatabaseUtil] SQL Exception while executing the following:
      CREATE TABLE cwd_directory_attribute (directory_id DECIMAL(18,0) NOT NULL, attribute_name VARCHAR(255) NOT NULL, attribute_value VARCHAR(255), CONSTRAINT PK_cwd_directory_attribute PRIMARY KEY (directory_id, attribute_name))
      Error was: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
      

      A full list of InnoDB restrictions including this one is listed at http://dev.mysql.com/doc/refman/5.6/en/innodb-restrictions.html

      Workaround

      You can use another database - PostgreSQL is an alternative which is also free. Alternatively if you are just having problems parsing an XML backup, then you could process the data manually and remove any 4 byte characters before importing to avoid the problem.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bberenberg Boris Berenberg (Inactive)
              Votes:
              87 Vote for this issue
              Watchers:
              92 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: