Bug #1265 Problems editing table with foregn key
Submitted: 12 Sep 2003 12:37 Modified: 1 Jun 2004 0:30
Reporter: Marko Kranjcic Email Updates:
Status: Closed Impact on me:
None 
Category:MySQLCC Severity:S2 (Serious)
Version:0.9.3b OS:Windows (Windows XP)
Assigned to: Jorge del Conde CPU Architecture:Any

[12 Sep 2003 12:37] Marko Kranjcic
Description:
If table created with foregn key is modified through MySQLCC, you can not save changes becouse it can not drop Constraint (this foregn key) with error:
ERROR 1091: Can't DROP '0_377'. Check that column/key exists

Table can be modified w/o problems through SQL ALTER commands. Through SQL you can even drop this key w/o problems..

How to repeat:
create tables with :
CREATE TABLE `i_navigation_lookup` (
  `IDParent` int(11) NOT NULL default '0',
  PRIMARY KEY  (`IDParent`),
) TYPE=InnoDB;
CREATE TABLE `i_navigation` (
  `IDNavigation` int(11) NOT NULL default '0',
  PRIMARY KEY  (`IDNavigation`),
  CONSTRAINT `navigation_key` FOREIGN KEY (`IDNavigation`) REFERENCES `i_navigation_lookup` (`IDParent`)
) TYPE=InnoDB;

Than try to do anything on table `i_navigation` (eg. add column, or set default value to existing column, or add index..)

Suggested fix:
I do not what causes this problem...
[22 Sep 2003 3:25] MySQL Verification Team
Thank you for your bug report I was able to repeat.
[1 Jun 2004 0:30] Jorge del Conde
Hi!

MySQLCC will not be developed nor maintained anymore with the exception of Critical bugs.

In the near future we will release the substitute of MySQLCC called MySQL Query Browser.