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

Specification of new hashing algo drops the requirement for a key to be specified

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      MDEV-9826-v4c CS 12.3.0 d366d5550536c07afda1444eb9b98d01a86cfbc4 (Debug, UBASAN, Clang 21.1.3-20250923) Build 28/01/2026

      12.3.0-dbg>CREATE TABLE t (c INT PRIMARY KEY) ENGINE=InnoDB PARTITION BY KEY PARTITIONS 5;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PARTITIONS 5' at line 1
       
      12.3.0-dbg>CREATE TABLE t (c INT PRIMARY KEY) ENGINE=InnoDB PARTITION BY KEY ALGORITHM=CRC32C() PARTITIONS 5;
      Query OK, 0 rows affected (0.030 sec)
       
      12.3.0-dbg>SHOW CREATE TABLE t\G
      *************************** 1. row ***************************
             Table: t
      Create Table: CREATE TABLE `t` (
        `c` int(11) NOT NULL,
        PRIMARY KEY (`c`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
       PARTITION BY KEY ALGORITHM = CRC32C ()
      PARTITIONS 5
      1 row in set (0.001 sec)
      

      Note the SHOW CREATE TABLE does not enumerate a selected key field either.

      Attachments

        Activity

          People

            ycp Yuchen Pei
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.