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

Duplicate primary keys are allowed after ADD COLUMN / UPDATE

    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

              • Assignee:
                marko Marko Mäkelä
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: