Description:
I have created a simple innodb table with a foreign key and two behaviours for delete and update.
The create-script provided by the server is correct, both actions are listed correctly. But via "show table status" just the "on update"-behaviour is shown in the Comment-field.
the create-script from the table:
CREATE TABLE `edges` (
`vertice1` varchar(25) NOT NULL default '',
`vertice2` varchar(25) default NULL,
KEY `vertice1` (`vertice1`),
KEY `vertice2` (`vertice2`),
CONSTRAINT `0_666` FOREIGN KEY (`vertice1`) REFERENCES `vertices` (`vertice`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `0_667` FOREIGN KEY (`vertice2`) REFERENCES `vertices` (`vertice`) ON DELETE SET NULL ON UPDATE CASCADE
) TYPE=InnoDB;
and the extract from the table status:
InnoDB free: 467968 kB; (vertice1) REFER YOURDBNAME/vertices(vertice) ON UPDATE CASCADE; (vertice2) REFER YOURDBNAME/vertices(vertice) ON UPDATE CASCADE
regards
Jens
How to repeat:
create an empty database and insert the innodb table from above and the following one. then compare the foreign-key behaviours in the create-script and in the comment-field
also needed table for testing:
CREATE TABLE `vertices` (
`vertice` varchar(25) NOT NULL default '',
KEY `vertice` (`vertice`)
) TYPE=InnoDB;
Suggested fix:
insert the 2nd behaviour in the comment-string ;)