Bug #32908 Relationship definitions not deleted
Submitted: 2 Dec 2007 8:34 Modified: 6 Dec 2007 8:54
Reporter: Gerard van Beek Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.0.10 OS:Windows (XP SP2)
Assigned to: Johannes Taxacher CPU Architecture:Any
Tags: relationship delete

[2 Dec 2007 8:34] Gerard van Beek
Description:
When a 1-n identifying relationship between two tables is added and removed, the visible part of the schema is correct. However, somewhere in the database the metadata about the relationship stays in place.

How to repeat:
Step 1: Create 3 tables (a,b,c), all with a primary key. Create and remove a 1-n identifying relationship between table b (1) and a (n).
Step 2: Now create a 1-n relationship (either identifying or not) between table c (1) and a (n). The primary key definition of table b will appear in the definition of table c.
If you repeat step 1 several times before executing step 2, the primary key will appear as many times in the definition of table c as step 1 was taken.

Suggested fix:
Physically remove the data about the identifying relationship when the relationship is removed from the schema.
[2 Dec 2007 10:59] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Duplicate of bug #32524
[2 Dec 2007 11:03] Sveta Smirnova
Please ignore previous comment.

I am sorry.

I can not repeat described behaviour with definition of primary key in table c, although I see many stalled indexes on the diagram. Please review screenshot which will be attached in 5 minutes and indicate if you talk about same behaviour.
[2 Dec 2007 11:07] Sveta Smirnova
screentshot

Attachment: bug32908.jpg (image/jpeg, text), 221.14 KiB.

[2 Dec 2007 11:07] Sveta Smirnova
Screenshot has been attached.
[2 Dec 2007 22:36] Gerard van Beek
I've added an example of the result I get. idb is defined as a foreign key but there is currently no relationship defined for table b.
[6 Dec 2007 0:11] Alfredo Kojima
Fixed in repository.
[6 Dec 2007 8:54] Johannes Taxacher
works in 5.0.10 SVN rev 2311