Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Turn ON general log and follow instructions on PT-1802. You will see:
2020-06-01T12:51:55.180936Z 9 Query CREATE TABLE `test`.`_joinit_new` (
`i` int(11) NOT NULL AUTO_INCREMENT,
`s` varchar(64) DEFAULT NULL,
`t` time NOT NULL,
`g` int(11) NOT NULL,
`j` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`i`),
KEY `i_fk` (`j`),
CONSTRAINT `__joinit_ibfk_1` FOREIGN KEY (`j`) REFERENCES `joinit` (`i`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=786406 DEFAULT CHARSET=latin1
Suggested fix.
Add a check to verify there are self-referencing FKs and make the program to not to run unless the new option --disable-fk-checks is used in the command line.
Environment
None
AFFECTED CS IDs
273594
Smart Checklist
Activity
Show:
Jira Bot August 17, 2020 at 6:55 AM
To: @Sveta Smirnova CC: @Carlos Salguero
Hi, I'm jira-bot, Percona's Jira automation tool. I've detected that someone from Percona has made an edit to the Summary field of an issue that you reported.
I'm not sentient (yet) so I'm not sure whether the person fixed a typo, changed a few words, or completely rewrote the text. In any case, it is Percona Engineering's intention to make the Summary and Description of an issue as accurate as possible so that we're fixing the actual problem you're encountering, and to avoid misunderstandings about symptoms and causes.
If the current Summary does not accurately reflect the problem you are reporting, or if you feel the change was otherwise inappropriate in some way, please add a new comment explaining things and we'll address it as soon as we can.
This message will be added only once per issue, regardless of how many times the Summary is edited.
message-code:summary-edited
Sveta Smirnova June 29, 2020 at 11:37 AM
@Carlos Salguero
Please check https://perconadev.atlassian.net/browse/PT-1802#icft=PT-1802. We need not only option --disable-fk-checks , but this option also need to set session variable foreign_key_checks to 0. In this case INPLACE algorithm will be used for ALTER, not COPY which used when foreign key checks enabled.
Carlos Salguero June 24, 2020 at 4:22 PM
@Paul Jacobs could you check the pull request and check the wording on the new parameter I added? Thanks
PT-1802 is not fixed in version 3.2
How To Repeat.
Turn ON general log and follow instructions on PT-1802. You will see:
2020-06-01T12:51:55.180936Z 9 Query CREATE TABLE `test`.`_joinit_new` ( `i` int(11) NOT NULL AUTO_INCREMENT, `s` varchar(64) DEFAULT NULL, `t` time NOT NULL, `g` int(11) NOT NULL, `j` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`i`), KEY `i_fk` (`j`), CONSTRAINT `__joinit_ibfk_1` FOREIGN KEY (`j`) REFERENCES `joinit` (`i`) ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=786406 DEFAULT CHARSET=latin1
Suggested fix.
Add a check to verify there are self-referencing FKs and make the program to not to run unless the new option --disable-fk-checks is used in the command line.