Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-2783

MySQL error in setup: Specified key was too long

    XMLWordPrintable

Details

    Description

      Due to an apparent bug in MySQL: http://bugs.mysql.com/bug.php?id=4541, one of Confluence's tables: os_propertyentry, cannot be created when "Confluence+MySQL is configured for foreign character sets or UTF-8": failing with the following error:

      create table OS_PROPERTYENTRY (entity_name VARCHAR(125) not null, entity_id BIGINT not null, entity_
      key VARCHAR(255) not null, key_type INTEGER, boolean_val BIT, double_val DOUBLE PRECISION, string_va
      l VARCHAR(255), long_val BIGINT, int_val INTEGER, date_val DATETIME, primary key (entity_name, entit
      y_id, entity_key))
      Nov 10, 2004 7:58:30 PM net.sf.hibernate.tool.hbm2ddl.SchemaUpdate execute
      SEVERE: Unsuccessful: create table OS_PROPERTYENTRY (entity_name VARCHAR(125) not null, entity_id BI
      GINT not null, entity_key VARCHAR(255) not null, key_type INTEGER, boolean_val BIT, double_val DOUBL
      E PRECISION, string_val VARCHAR(255), long_val BIGINT, int_val INTEGER, date_val DATETIME, primary k
      ey (entity_name, entity_id, entity_key))
      Nov 10, 2004 7:58:30 PM net.sf.hibernate.tool.hbm2ddl.SchemaUpdate execute
      SEVERE: Syntax error or access violation message from server: "Specified key was too long; max key l
      ength is 1024 bytes"

      or in summary:

      "Specified key was too long; max key length is 1024 bytes"

      Because a UTF-8 character is stored as three bytes in MySQL the maximum key length can only be 1024/3 characters long. The compound key in the os_propertyentry table seems to be violating this constraint.

      Attachments

        Issue Links

          Activity

            People

              8873c89cc788 Daniel Ostermeier
              dave@atlassian.com dave (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: