Bug #44630 Create foreign keys fail
Submitted: 3 May 2009 19:02 Modified: 18 Jun 2009 9:03
Reporter: Ermicioi Andrei Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.1.12 OS:Linux (Ubuntu 9.04, 64 bit)
Assigned to: CPU Architecture:Any
Tags: foreign keys

[3 May 2009 19:02] Ermicioi Andrei
Description:
Try to define a foreign key in Indexes tab.
Can not choose FOREIGN from drop down menu when try to define key, also the field which must become foreign key is not checked.
As result I can not create foreign keys between tables :(

How to repeat:
Try to create foreign keys.
[4 May 2009 13:00] MySQL Verification Team
Thank you for the bug report. Sorry I am not understanding what are you reporting, to create foreign keys you need to use the Foreign Keys tab not the indexes tab. Thanks in advance.
[4 May 2009 13:24] Ermicioi Andrei
Ok. I'll try to describe again.
1. I have tables:
 Table1 with fields (id INT PRIMARY KEY, fkId INT)
 Table2 with fields (id INT PRIMARY KEY)
2. Try to make fkId from Table1 the FOREIGN KEY for id from table Table2
3. Edit Table1, tab Foreign Keys, give the name, in Referenced Table choose Table2.
4. In Index Columns in Column column I have id, fkId, so I try to check the fkId, then, in Referenced Column to choose id, but I can't check the fkId
[6 May 2009 16:20] Evie White
Note, in the 5.0.30 version, if you create an index on the "Indexes" tab with a Type= FOREIGN then you could not define the Column and Reference Column. Further, you could not delete the foreign key index. To workaround, you have to change the Type to something other than FOREIGN and then delete. To create a Foreign key, go to the "Foreign Keys" tab.

In this version, 5.1.12, I noticed that the "Indexes" tab does let the user create a foreign key because if you choose a Type = FOREIGN then the type will reset to INDEX. This is good since we should go to the "Foreign Keys" tab. (It would be better if the FOREIGN type option didn't show up in the drop down list.)

HOWEVER, creating a Foreign Key on the Foreign Keys tab does work any more if you are creating more than one foreign key. (I will enter a bug to describe.)
[18 May 2009 9:03] Susanne Ebrecht
Many thanks for writing a bug report. Unfortunately I am not able to see the point here.
Do you mean here we just should remove the FOREIGN option?
[18 Jun 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".