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

BLACKHOLE index limited to 1000 bytes: "Specified key was too long; max key length is 1000 bytes"

    XMLWordPrintable

Details

    Description

      (filed under Storage Engine - InnoDB because there is no component "Storage Engine - Blackhole", but it affects InnoDB compatibility)

      Previous versions of InnoDB had a max index length of <1KB. Most modern versions of MariaDB increase that to 3KB+ (the innodb_large_prefix option).

      Blackhole, while it is not an engine enabled by default on MariaDB, it is still shipped with it, and may have some limited usage for which it would be useful, even if can create many issues. One of the usages is to replicate to a separate server but ignore all data. However, there is a big compatibility issue between InnoDB and blackhole, and that is that indexes on Blackhole cannot be larger than 1KB.

      max index length for Blackwhole is an arbitrary constant (https://github.com/MariaDB/server/blob/10.6/storage/blackhole/ha_blackhole.h#L70 ), and increasing it is very simple (no complex data to manage), but Oracle MySQL ignored the upstream bug report: https://bugs.mysql.com/bug.php?id=53588
      Percona has applied such a patch: https://github.com/percona/percona-server/pull/2000 , and it has already a 3KB limit. I don't see a reason not to apply the same patch (or a similar, it is a one line change + tests) as it would improve compatibility, not break it.

      Attachments

        Activity

          People

            danblack Daniel Black
            jcrespo Jaime Crespo
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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