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

Duplicate constraint names

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.2(EOL)
    • 10.2.2
    • OTHER
    • 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

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