Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 5.5
-
Fix Version/s: 5.5.45
-
Component/s: Data Definition - Alter Table
-
Labels:None
-
Sprint:5.5.45
Description
CREATE TABLE t111 ( id int(11) NOT NULL PRIMARY KEY, a int(11) NOT NULL, b int(11) NOT NULL, c int not null, CONSTRAINT test FOREIGN KEY (b) REFERENCES t111 (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE t112 ( id int(11) NOT NULL PRIMARY KEY, a int(11) NOT NULL, b int(11) NOT NULL, c int not null, CONSTRAINT test FOREIGN KEY (b) REFERENCES t61 (id) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ERROR 1005 (HY000): Can't create table `test`.`t112` (errno: 121 "Duplicate key on write or update") MariaDB [test]> show warnings; +---------+------+----------------------------------------------------------------------------------+ | Level | Code | Message | +---------+------+----------------------------------------------------------------------------------+ | Error | 1005 | Can't create table `test`.`t112` (errno: 121 "Duplicate key on write or update") | | Warning | 1022 | Can't write; duplicate key in table 't112' | +---------+------+----------------------------------------------------------------------------------+ 2 rows in set (0.00 sec)
This error message is not very helpful, it should contain what is the duplicate key name and why.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions