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

Wrong data type on column `COLLATE DEFAULT` and table `COLLATE some_non_default_collation`

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL)
    • 10.9.0
    • Character Sets
    • None

    Description

      CREATE OR REPLACE TABLE t1 (a CHAR(10) COLLATE DEFAULT) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
      SHOW CREATE TABLE t1;
      

      +-------+---------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                    |
      +-------+---------------------------------------------------------------------------------------------------------------------------------+
      | t1    | CREATE TABLE `t1` (
        `a` char(10) COLLATE utf8mb4_bin DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin |
      +-------+---------------------------------------------------------------------------------------------------------------------------------+
      

      Looks wrong. The expected behaviour would be to create the column with the collation utf8mb4_general_ci, i.e. use the default collation of the column character set utf8mb4, which is inherited from the table level.

      It should not inherit the collation from the table level.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.