Bug #7431 FK not exact
Submitted: 20 Dec 2004 14:31 Modified: 3 Aug 2006 8:13
Reporter: Mickael Besson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.0.18 OS:Windows (Windows NT4)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any
Tags: Object Editors

[20 Dec 2004 14:31] Mickael Besson
Description:
The foreign key don't appear correctly sometimes (when links use multiple DB I noted).
I made a FK between tables in the same DB and in the same time with another DB.
3 FK into the table TLP_DATA :

create table TLP_DATA
...
  CONSTRAINT `tlp_data_ibfk_1` FOREIGN KEY (`IDT_CARTE`) REFERENCES `tlp_carte` (`IDT_TC`),
  CONSTRAINT `tlp_data_ibfk_2` FOREIGN KEY (`IDT_GSM`) REFERENCES `tlp_gsm` (`IDT_TG`),
  CONSTRAINT `tlp_data_ibfk_3` FOREIGN KEY (`PER_MAT`) REFERENCES `rfg`.`rfg_per` (`PER_MAT`) <-- here foreign DB
...

MySQL Administrator displays only one FK, and moreover it's a wrong FK :
Column : IDT_CARTE
Reference column : PER_MAT

When back up this table, the script is correct, FK are present, so it's an error of the software.

How to repeat:
create a table with FKs with another table of the same Db and of another DB.
look FK with MySQL Adm.

Suggested fix:
FK detection