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

CREATE UNIQUE INDEX fails with "ERROR 1286 (42000): Unknown storage engine 'partition'"

    XMLWordPrintable

Details

    Description

      This fails:
      ===========

      CREATE UNIQUE INDEX MyIndexName on MyTableName (
      UserId ASC,
      RepId ASC,
      Field03,
      Field04
      );
       
      "ERROR 1286 (42000): Unknown storage engine 'partition'"
      
      

      This works:
      ============

      ALTER TABLE MyTableName ADD UNIQUE MyIndexName (UserId ASC,
      RepId ASC,
      Field03,
      Field04
      );
      
      

      Table definition:

       
       CREATE TABLE `MyTableName` (
        `Field01` bigint(20) NOT NULL,
        `UserId` bigint(20) NOT NULL,
        `RepId` bigint(20) NOT NULL,
        `Field03` varchar(32) NOT NULL,
        `Field04` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
        PRIMARY KEY (`UserId`,`RepId`,`Field01`)
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
       PARTITION BY HASH (`UserId`)
      PARTITIONS 10
      

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            claudio.nanni Claudio Nanni
            Votes:
            1 Vote for this issue
            Watchers:
            7 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.