Bug #7486 Access violation when deleting a foreign key
Submitted: 22 Dec 2004 15:33 Modified: 8 Jun 2005 15:49
Reporter: Mark Junker Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.3 OS:Windows (WinXP Pro SP2)
Assigned to: Michael G. Zinner CPU Architecture:Any

[22 Dec 2004 15:33] Mark Junker
Description:
Hi,

sometimes I get an access violation (shown in the status bar of the main window) when deleting a single foreign key.

Regards,
Mark

How to repeat:
1. Create a table with the following statement:

CREATE TABLE `test`.`test9` (
  `test9_id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  `data` VARCHAR(45) NOT NULL,
  PRIMARY KEY(`test9_id`)
)
TYPE = InnoDB;

2. Create a table with the following statement:

CREATE TABLE `test`.`test10` (
  `test10_id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  `data` VARCHAR(45) NOT NULL,
  PRIMARY KEY(`test10_id`)
)
TYPE = InnoDB;

3. Create a table with the following statement:

CREATE TABLE `test`.`test11` (
  `test11_id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  `test9_id` INTEGER UNSIGNED NOT NULL,
  `test10_id` INTEGER UNSIGNED NOT NULL,
  PRIMARY KEY(`test11_id`),
  CONSTRAINT `FK_test11_1` FOREIGN KEY `FK_test11_1` (`test9_id`)
    REFERENCES `test9` (`test9_id`)
    ON DELETE RESTRICT
    ON UPDATE RESTRICT,
  CONSTRAINT `FK_test11_2` FOREIGN KEY `FK_test11_2` (`test10_id`)
    REFERENCES `test10` (`test10_id`)
    ON DELETE RESTRICT
    ON UPDATE RESTRICT
)
TYPE = InnoDB;

4. Open the "Table Editor" window for "table11"
5. Select the "Foreign Keys" tab
6. Delete the foreign key "FK_test11_1"
7. Press "Apply Changes"

In the status bar, I can now see the following message:

"Access violation at address 00358C2A in module "libmysqlx.dll". Read of address 00000001
[8 Jun 2005 15:49] Michael G. Zinner
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/