[MDEV-14897] After UPDATE of instant ADD COLUMN, PRIMARY KEY accepts duplicates Created: 2018-01-09  Updated: 2018-01-09  Resolved: 2018-01-09

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.3.2
Fix Version/s: 10.3.4

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Duplicate Votes: 0
Labels: corruption, instant

Issue Links:
Blocks
blocks MDEV-14840 Assertion `!log->same_pk' failed in r... Closed
Duplicate
duplicates MDEV-14837 Duplicate primary keys are allowed af... Closed
Problem/Incident
is caused by MDEV-11369 Instant add column for InnoDB Closed

 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'



 Comments   
Comment by Marko Mäkelä [ 2018-01-09 ]

This was already reported as MDEV-14837.

Generated at Thu Feb 08 08:17:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.