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

SHOW INDEX returns Index_type BTREE for Index_type HASH

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.6.4, 10.6.10, 11.0.2
    • N/A
    • N/A
    • tested on Ubuntu 22.04 and Ubuntu 20.04

    Description

      Lets have the following table:

      CREATE TABLE `example` (
        `example_id` int(11) NOT NULL,
        `index_btree` int(11) NOT NULL,
        `index_hash` int(11) NOT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
       
      ALTER TABLE `example`
        ADD PRIMARY KEY (`example_id`),
        ADD KEY `example_hash` (`index_hash`) USING HASH,
        ADD KEY `example_btree` (`index_btree`) USING BTREE;
       
      ALTER TABLE `example`
        MODIFY `example_id` int(11) NOT NULL AUTO_INCREMENT;
      

      Now we have a look at the index by

      SHOW INDEX FROM example;
      

      And see that the Index_type is BTREE for Index example_hash.

      As a result of this PHPMyadmin also shows the wrong type. In a created export the index_type is correctly set to HASH...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sk.accountone Sebastian Krüger
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.