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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
    • Fix Version/s: 10.9.0
    • Component/s: Character Sets
    • Labels:
      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

              Assignee:
              bar Alexander Barkov
              Reporter:
              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.