Bug #107532 | running parallel TRUNCATE causing foreign key constraint fails on INSERT | ||
---|---|---|---|
Submitted: | 9 Jun 2022 20:21 | Modified: | 14 Jun 2022 12:04 |
Reporter: | DIMITRY KUDRYAVTSEV (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | 8.0 | OS: | Ubuntu (debian docker) |
Assigned to: | CPU Architecture: | Any | |
Tags: | foreign key, Foreign Key Constraints, truncate |
[9 Jun 2022 20:21]
DIMITRY KUDRYAVTSEV
[9 Jun 2022 22:01]
DIMITRY KUDRYAVTSEV
Changing the category to InnoDB storage engine
[10 Jun 2022 12:16]
MySQL Verification Team
Hi Mr. Kudryavtsev, Thank you for your bug report. However we need some additional info. You have added `wait` shell command in your script. Is it truly necessary and for which PID is it waiting for ??? We are waiting on your feedback.
[10 Jun 2022 14:06]
Bill Karwin
In bash, wait invoked with no arguments waits for all child processes to finish. I tested the script and I confirm it does reproduce the failure. I tested on MacOS 12.3.1 with MySQL 8.0.29 compiled for the ARM processor. The failure occurs after a variable number of iterations of the loop. Sometimes it gets through all 100 iterations with no failure. Sometimes it happens within 10 iterations.
[10 Jun 2022 14:22]
MySQL Verification Team
Thank you, Mr. Karwin.
[10 Jun 2022 18:59]
DIMITRY KUDRYAVTSEV
Thanks Bill. I'm glad that other people were able to reproduce this in different environments. When we run our tests, we truncate about 80+ tables, that have foreign key constraints, this bug happens much more frequent than the bash script might indicate. Moreover, after the database entered the bad state none of the mysqladmin commands helped (tried flush-tables, flush-threads, etc..). The only thing that helped was truncating the tables again. It seems to me that this is a S1 or S2 bug and I hope it gets fixed soon.
[14 Jun 2022 12:04]
MySQL Verification Team
Hi Mr. Kudryavtsev, Thank you for your bug report. We have managed to reproduce it. This is now a fully verified bug.
[8 Mar 19:02]
Daniel Kowalewski
This bug is also affecting our testing workflows. Is there any update on when this might be fixed?
[11 Mar 11:06]
MySQL Verification Team
Hi, Thank you for your enquiry. Each Development Team has it's own schedule for new features and bug fixing. Those schedules are changed on the weekly basis, so there is nobody who could answer your question.