Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-3133

Stash 2.1.2 failing with MySQL 5.6 due to "specified key was too long" error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 2.2.0
    • 2.1.2
    • Database - MySQL
    • None

    Description

      Stash 2.1.2 installation with MySQL is failing with this exception:

      The schema could not be created.
      com.atlassian.stash.internal.migration.DefaultMigrationHelper.createSchema(DefaultMigrationHelper.java:117)
      com.atlassian.stash.internal.migration.AbstractMigrationMaintenanceTask.setup(AbstractMigrationMaintenanceTask.java:195)
      com.atlassian.stash.internal.maintenance.ActiveMaintenanceTaskContext.setup(ActiveMaintenanceTaskContext.java:166)
      ...
      Migration failed for change set liquibase/r1_3/m01.xml::STASHDEV-1023-10::bturner:
      Reason: liquibase.exception.DatabaseException: Error executing SQL CREATE INDEX `idx_sta_diff_comment_anchors` ON `stash`.`sta_diff_comment_anchor`(`to_hash`, `file_path`, `from_hash`): Specified key was too long; max key length is 767 bytes:
      Caused By: Error executing SQL CREATE INDEX `idx_sta_diff_comment_anchors` ON `stash`.`sta_diff_comment_anchor`(`to_hash`, `file_path`, `from_hash`): Specified key was too long; max key length is 767 bytes:
      Caused By: Specified key was too long; max key length is 767 bytes
      liquibase.changelog.ChangeSet.execute(ChangeSet.java:347)
      liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)
      liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)
      ...
      Error executing SQL CREATE INDEX `idx_sta_diff_comment_anchors` ON `stash`.`sta_diff_comment_anchor`(`to_hash`, `file_path`, `from_hash`): Specified key was too long; max key length is 767 bytes
      liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62)
      liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104)
      liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091)
      ...
      Specified key was too long; max key length is 767 bytes
      sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      

      This has been reported on MySQL 5.6
      This seems to have exceeded the Innodb limit of 767 bytes (40, 1024, 40) for (`to_hash`, `file_path`, `from_hash`).

      Attachments

        Issue Links

          Activity

            People

              bturner Bryan Turner (Inactive)
              ganand Gurleen Anand [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: