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

Duplicate primary keys are allowed after ADD COLUMN / UPDATE

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (pk VARCHAR(3) PRIMARY KEY) ENGINE=InnoDB;
      INSERT INTO t1 VALUES ('foo');
      ALTER TABLE t1 ADD COLUMN f INT;
      UPDATE t1 SET f = 1;
      --error ER_DUP_ENTRY
      INSERT INTO t1 VALUES ('foo',NULL);
       
      # Cleanup
      DROP TABLE t1;
      

      The test fails on INSERT, because it actually succeeds instead of producing the expected ER_DUP_ENTRY.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.