Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.5.27, 10.6.20, 10.11.10, 11.2.6, 11.4.4
Description
After upgrading to v10.11.10 creation of a foreign key failed with no information in engine innodb status. The same keys are allowed in 10.11.9 and below.
reproducer SQL:
CREATE TABLE `a` (
|
`a_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`a_p_id` int(10) unsigned DEFAULT NULL,
|
PRIMARY KEY (`a_id`),
|
FOREIGN KEY (`a_p_id`) REFERENCES `a` (`a_id`)
|
) ENGINE=InnoDBa
|
|
|
CREATE TABLE `b` (
|
`b_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`b_p_id` int(10) unsigned DEFAULT NULL,
|
PRIMARY KEY (`b_id`),
|
FOREIGN KEY (`b_p_id`) REFERENCES `b` (`b_id`)
|
) ENGINE=InnoDB
|
|
|
CREATE TABLE `b_a` (
|
`b_id` int(10) unsigned NOT NULL,
|
`a_p_id` int(10) unsigned NOT NULL,
|
`a_id` int(10) unsigned DEFAULT NULL,
|
PRIMARY KEY (`b_id`,`a_p_id`),
|
FOREIGN KEY (`b_id`) REFERENCES `b` (`b_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
FOREIGN KEY (`a_p_id`, `a_id`) REFERENCES `a` (`a_p_id`, `a_id`) ON UPDATE CASCADE
|
) ENGINE=InnoDB
|
Changing the table b_a latest foreign key to "on delete cascade" does allow the table to be created, but that is not what I want to archieve.
Attachments
Issue Links
- is caused by
-
MDEV-34392 modification of the column fails to check foreign key constraint
- Closed