Bug #50462 FK Index Limitation
Submitted: 20 Jan 2010 4:20 Modified: 19 Apr 2010 21:02
Reporter: William Key Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2 OS:Any (Windows 7, Ubuntu)
Assigned to: CPU Architecture:Any
Tags: fk, foreign keys, indexes

[20 Jan 2010 4:20] William Key
Description:
When creating a foreign key an index is automatically created with the type foreign. This is good except there is no way to modify the index manually or delete the index created. It will also create a new index even if there is already an index for that column.

This becomes a problem when you're trying to do an index with two fields but only one is in the constraint. This doesn't seem to be a limitation in MySQL either so not sure why it is in Workbench.

How to repeat:
Create a new schema with two tables. Create a foreign key on the first table to the second table. Try modifying the foreign key index.

Suggested fix:
Maybe having the ability to disable the "auto complete" feature completely or disable it for a specific table. To me, adding the index automatically is to help make the person's life easier, not constrain them.
[20 Jan 2010 11:43] Susanne Ebrecht
Many thanks for writing a bug report.

This is still true for Workbench 5.2.

A second index will be created when there already is an index on the column.
[19 Apr 2010 21:02] Alfredo Kojima
This is a duplicate of bug #48728, which has been fixed