Bug #14984 Should produce better foreign key names
Submitted: 16 Nov 2005 13:04 Modified: 16 Dec 2005 14:16
Reporter: Alexandre Gomes Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version: OS:
Assigned to: Assigned Account CPU Architecture:Any

[16 Nov 2005 13:04] Alexandre Gomes
Description:
When we add a new foreign key Query Browser always uses the same name: new_fk_constraint

While it should be expected that the users pay attention to this and change the name to something more describing, they can forget that. The problem is when they try to add a second FK, where Query Browser put the same name on it...

Following my bug report: http://bugs.mysql.com/bug.php?id=14981 mysql server should report a better error, but Query Browser should pay attention to this also and try to check the FK names already beeing used and suggest new_fk_constraint1 ... 2 ... 3.

Better yet is that, if the user didn't change manualy the FK name, Query Browser changes its default name to something like fk_table_column_fkTable_fkColumn.

How to repeat:
Create a using the default name, then create another one in same coditions.

Suggested fix:
Better name generation like suggested. Yet, since user can manualy change the name better bug report at both mysqlserver and Query Browser levels (http://bugs.mysql.com/bug.php?id=14981) are required.
[16 Nov 2005 14:16] MySQL Verification Team
Sorry I don't understand well here. QB 1.1.17 FK name suggestions is:

FK_table_name1

Could you please provide a screenshot about.

Thanks in advance.
[17 Dec 2005 0: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".