Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.3.2
Description
--source include/have_innodb.inc
|
CREATE TABLE t1 (t TEXT, PRIMARY KEY (t(1))) ENGINE=InnoDB;
|
INSERT INTO t1 SET t='aa';
|
ALTER TABLE t1 ADD COLUMN b INT;
|
UPDATE t1 SET b = 1;
|
INSERT INTO t1 SET t='ab';
|
SELECT * FROM t1;
|
DROP TABLE t1;
|
The second INSERT should fail due to the duplicate column prefix key 'a', but instead the record will be inserted. With ROW_FORMAT=REDUNDANT the operation will fail as expected:
mysqltest: At line 6: query 'INSERT INTO t1 SET t='ab'' failed: 1062: Duplicate entry 'a' for key 'PRIMARY'
|
Attachments
Issue Links
- blocks
-
MDEV-14840 Assertion `!log->same_pk' failed in row_log_table_apply_delete
- Closed
- duplicates
-
MDEV-14837 Duplicate primary keys are allowed after ADD COLUMN / UPDATE
- Closed
- is caused by
-
MDEV-11369 Instant add column for InnoDB
- Closed