Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5, 10.6, 10.11, 11.2(EOL), 11.4
Description
Test case to repeat the failure:
CREATE TABLE t1 (data VARCHAR(7961));
|
INSERT INTO t1 VALUES ('f'), ('o'), ('o');
|
ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data);
|
ALTER IGNORE TABLE t1 ADD UNIQUE INDEX (data(1));
|
SELECT * FROM t1;
|
SHOW CREATE TABLE t1;
|
ALTER TABLE t1 ADD SYSTEM VERSIONING ;
|
SELECT * FROM t1;
|
REPLACE INTO t1 VALUES ('f'), ('o'), ('o');
|
mysqltest: At line 10: query 'REPLACE INTO t1 VALUES ('f'), ('o'), ('o')' failed: 1062: Duplicate entry 'o' for key 'data'
This problem happens when versioning + long unique hash index involved.
In write_record(), if the failed unique index is not last then we do
delete the record and insert again. Since it is a versioning table,
we do try to ha_update_row(). But it fails in check_duplicate_long_entries_update()
and returns HA_ERR_FOUND_DUPP_KEY. Irrespective of engine, behaviour is same.
Attachments
Issue Links
- causes
-
MDEV-36208 dbug_print_table_row is broken: prints empty rows in debugger
-
- Closed
-
-
MDEV-36507 fix dbug_print_row concurrent access
-
- Closed
-
- duplicates
-
MDEV-15990 REPLACE on a precise-versioned table returns duplicate key error (ER_DUP_ENTRY)
-
- Stalled
-
Activity
Transition | Time In Source Status | Execution Times |
---|
|
34d 10h 48m | 1 |
|
7d 17h 19m | 1 |
|
21d 4h 22m | 1 |
|
7d 4h 5m | 1 |