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

Multiple conflicting table COLLATE clauses are not rejected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9
    • Fix Version/s: 10.9.2
    • Component/s: Character Sets
    • Labels:
      None

      Description

      The problem described in MDEV-28067 is also repeatable on the table level:

      CREATE OR REPLACE TABLE t1 (a CHAR(10)) COLLATE latin1_swedish_ci COLLATE latin1_bin;
      SHOW CREATE TABLE t1;
      

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

      The expected behaviour would be to return a "conflicting declarations" error.

      The problem is also repeatable on the database level:

      CREATE OR REPLACE database db1 COLLATE latin1_swedish_ci COLLATE latin1_bin;
      SHOW CREATE DATABASE db1;
      

      +----------+-----------------------------------------------------------------------------------+
      | Database | Create Database                                                                   |
      +----------+-----------------------------------------------------------------------------------+
      | db1      | CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_bin */ |
      +----------+-----------------------------------------------------------------------------------+
      1 row in set (0.001 sec)
      

        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.