Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-30087

Prefix UNIQUE HASH raises unexpected Specified key part was too long

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.11, 11.0
    • 10.4
    • Data types
    • None

    Description

      Unique hash keys work fine on the entire LONGTEXT column:

      CREATE OR REPLACE TABLE t3 (a LONGTEXT CHARACTER SET utf8, UNIQUE KEY(a) USING HASH);
      

      However, if I create an Unique hash key using a long prefix, it fails with an error:

      CREATE OR REPLACE TABLE t3 (a LONGTEXT CHARACTER SET utf8, UNIQUE KEY(a(35000)) USING HASH);
      

      ERROR 4159 (42000): Specified key part was too long; max key part length is 65535 bytes
      

      The above error looks wrong.

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.