Bug #2792 2nd foreign key behaviour "On * do-sth" is missing in comment of Table-Status

Submitted: 14 Feb 2004 6:03 Modified: 14 Sep 2004 13:03
Reporter: Jens Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:4.0.16 OS:Linux (Debian 3.0)
Assigned to: Heikki Tuuri CPU Architecture:Any

[14 Feb 2004 6:03] Jens
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 ;)
[16 Feb 2004 15:21] Dean Ellis
Verified against 4.0.19 and 4.1.2.  Thank you.
[14 Sep 2004 13:03] Heikki Tuuri
Hi!

The output width in SHOW TABLE STATUS is restricted. Use SHOW CREATE TABLE.

Regards,

Heikki

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.