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

Duplicate constraint names

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 10.2
    • Fix Version/s: 10.2.2
    • Component/s: OTHER
    • Labels:
      None

      Description

      This script:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a INT);
      ALTER TABLE t1 ADD CONSTRAINT c1 CHECK (a > 0);
      ALTER TABLE t1 ADD CONSTRAINT c1 CHECK (a > 0);
      SHOW CREATE TABLE t1;
      

      returns:

      CREATE TABLE `t1` (
        `a` int(11) DEFAULT NULL,
        CONSTRAINT `c1` CHECK (a > 0),
        CONSTRAINT `c1` CHECK (a > 0)
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 
      

      Notice, two constrains with a duplicate name are allowed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              holyfoot Alexey Botchkov
              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.