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(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.11, 11.0(EOL)
    • 10.4(EOL)
    • 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.