Deleting in table with foreign key on the same table needs refresh to see all the rows deleted.

[expired user #8956]'s profile image [expired user #8956] posted 9 years ago in General Permalink
I'm on a roll today. I posted two little bugs. Not that problematic but worth mentioning. Thank you for HeidiSQL, is a great software.

So for this second bug I have:
CREATE TABLE IF NOT EXISTS `tbl1` (
`parent` int(11) NOT NULL AUTO_INCREMENT,
`child` int(11) DEFAULT NULL,
PRIMARY KEY (`parent`),
KEY `FK_tbl1_tbl1` (`child`),
CONSTRAINT `FK_tbl1_tbl1` FOREIGN KEY (`child`) REFERENCES `tbl1` (`parent`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tbl1` (`parent`, `child`) VALUES
(1, 1),
(2, 1),
(3, 2);


In the attachment is how it looks the data after deleting the row 2 under column `parent`. I need to refresh(F5) to see the row 3 gone. So this is only a gui bug, the row 3 is deleted from database but I need to refresh to see it deleted in HeidiSQL.
1 attachment(s):
  • data

Please login to leave a reply, or register at first.