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

Instant change of ENUM is refused because of COLLATE mismatch

    XMLWordPrintable

Details

    Description

      In the following test, the first ALTER TABLE unexpectedly fails:

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (e enum('a','b','c') COLLATE utf8mb4_unicode_ci DEFAULT 'a') ENGINE=InnoDB;
       
      --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
      ALTER TABLE t1 MODIFY e ENUM('a','b','c','d'), ALGORITHM=INSTANT;
       
      ALTER TABLE t1 MODIFY e ENUM('a','b','c','d') COLLATE utf8mb4_unicode_ci, ALGORITHM=INSTANT;
      DROP TABLE t1;
      

      I believe that it is wrong to require that the collation matches in this case. Even if there was an index defined on the column, that index should use normal integer sorting rules, and the collation on the textual ENUM symbols that map to the integer symbols should not matter at all.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              marko Marko Mäkelä
              Votes:
              1 Vote for this issue
              Watchers:
              3 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.