[MDEV-16102] Wrong ER_DUP_ENTRY upon ADD UNIQUE KEY on versioned table Created: 2018-05-07  Updated: 2019-08-05  Resolved: 2019-08-05

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Versioned Tables
Affects Version/s: 10.3
Fix Version/s: 10.3.8

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Aleksey Midenkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-16301 IB: use real table name for error mes... Closed

 Description   

CREATE TABLE t1 (i INT) WITH SYSTEM VERSIONING;
INSERT INTO t1 VALUES (1),(1);
DELETE FROM t1;
 
ALTER TABLE t1 ADD UNIQUE KEY (i);
 
# Cleanup
DROP TABLE t1;

10.3 a22a339f8e

mysqltest: At line 5: query 'ALTER TABLE t1 ADD UNIQUE KEY (i)' failed: 1062: Duplicate entry '1' for key 'i'



 Comments   
Comment by Sergei Golubchik [ 2018-05-07 ]

system_versioning_alter_history=ERROR should disallow adding a new UNIUQUE constraint. Or any constraint, FWIW.

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