Bug #47268 | On creating foreign keys, selecting referenced column doesnt work | ||
---|---|---|---|
Submitted: | 11 Sep 2009 9:41 | Modified: | 14 Sep 2009 14:39 |
Reporter: | Emil Emilsson | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Workbench | Severity: | S2 (Serious) |
Version: | 5.1.18 | OS: | Windows (XP Sp2) |
Assigned to: | CPU Architecture: | Any | |
Tags: | foreign keys, referencing column |
[11 Sep 2009 9:41]
Emil Emilsson
[11 Sep 2009 11:43]
Valeriy Kravchuk
What exact iversion, 5.1.x do you use? I can not repeat this with latest, 5.1.18, on XP.
[11 Sep 2009 11:49]
Emil Emilsson
I added my mwb file that is the cause of the problem if you do properties on the researchfund_subcategory table and try to click the checkbox infront of the colum to reference it doesnt get checked. if I add a new table its fine in that table.
[11 Sep 2009 13:18]
Valeriy Kravchuk
What table should I select as "Referenced table" while trying to add new foreign key to that Reseachfund_Main table? When no table is selected, indeed, you can not check columns, but this is reasonable IMHO - they have nothing to refer to.
[11 Sep 2009 13:41]
Emil Emilsson
I rightclick "researchfund_subcategory2 table edit that and select foreign keys there are two "foreign key name" and "Referenced table" i cannot select a column to be the referenced column fkResearchFundMain for example.
[11 Sep 2009 13:57]
Valeriy Kravchuk
Verified just as described in your last comment. Sorry, used wrong table by mistake...
[14 Sep 2009 14:33]
Johannes Taxacher
Hi Emil, this issue came up in your model because we tightened the checks on datatypes for columns connected in a FK. in your model you've got IN(11) in the table you wanted to create the FKs on, and INT as datatype for the referenced key-columns. So its actually expected behavior, but we have to improve the feedback for the user on that so that its more obvious why WB refuses to let you link the two columns.
[14 Sep 2009 14:39]
Emil Emilsson
Ok, I didnt realise that I had int(11) in the referenced table. I agree that an informative error message should be shown. When I changed that I managed to select those references just fine. I sometimes managed to get an error message, like a crash message when messing around with that but it didnt crash the whole program. If I manage to get that message again I will paste it into a new bug report. But thank you for solving that problem :)