Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.4(EOL)
-
None
Description
Given there is an InnoDB table with no PK, and (at least) one unique key:
CREATE TABLE test_tbl ( |
col1 int(10) unsigned NOT NULL, |
UNIQUE KEY uniq (col1) |
) ENGINE=innodb;
|
Attempting to add a PK on the same columns:
ALTER TABLE test_tbl ADD PRIMARY KEY(col1); |
Gives the following error:
ERROR 1280 (42000): Incorrect index name 'uniq'
|
and the PK is not created.
This doesn't happen on latest 10.3 or latest 10.5 from dockerhub, only with 10.4
Attachments
Issue Links
- is duplicated by
-
MDEV-19598 Unexpected ER_WRONG_NAME_FOR_INDEX upon adding primary key on top of unique
- Open