Bug #25356 FOREIGN KEY constraints changed after executing CREATE INDEX
Submitted: 2 Jan 2007 3:39 Modified: 8 Jan 2007 14:56
Reporter: Siu Ching Pong (Asuka Kenji) (Basic Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.1.14-beta-log OS:Linux (Linux (Fedora Core 5))
Assigned to: CPU Architecture:Any
Tags: corrupt, corruption, create index, fk, foreign key, INDEX

[2 Jan 2007 3:39] Siu Ching Pong (Asuka Kenji)
Description:
If an index is created after the table is created, the "ON DELETE" and "ON UPDATE" foreign key constraint(s) in the table disappear.

This bug may be related to Bug #24741.

How to repeat:
Please refer to the attachment.
[2 Jan 2007 3:44] Siu Ching Pong (Asuka Kenji)
Test Case

Attachment: bug25356.test (application/octet-stream, text), 945 bytes.

[2 Jan 2007 3:48] Siu Ching Pong (Asuka Kenji)
Please note that t2 in the test case does not have any problem. t3's index is added afterwards and triggers the problem.
[2 Jan 2007 13:08] Heikki Tuuri
This is probably a duplicate of http://bugs.mysql.com/bug.php?id=24741
[8 Jan 2007 14:55] Heikki Tuuri
This clearly is a duplicate of http://bugs.mysql.com/bug.php?id=24741
[8 Jan 2007 15:39] Valeriy Kravchuk
Duplicate of Bug #24741.