[MDEV-13331] FK DELETE CASCADE does not honor innodb_lock_wait_timeout Created: 2017-07-15 Updated: 2018-10-24 Resolved: 2017-08-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.2.2 |
| Fix Version/s: | 10.2.8 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Note: I'm not sure if it's intentional, cannot find anything about it in MySQL changelog, bug base or manual. If it's intentional, please feel free to close or move to documentation if necessary. In InnoDB 5.7, if a row which needs to be deleted through DELETE CASCADE is locked, the DELETE hangs seemingly forever – neither innodb_lock_wait_timeout nor lock_wait_timeout have any effect. In InnoDB 5.6 (MariaDB 10.1, MySQL 5.6) it works as expected.
the test case hangs after that. With MySQL the last line, DELETE, is not printed, it's normal and signifies the same result. |
| Comments |
| Comment by Marko Mäkelä [ 2017-08-15 ] | |||||||||||||||||||||||
|
This looks like a regression introduced by a bug fix in MySQL 5.7.8. The bug is that row_ins_check_foreign_constraint() keeps returning DB_LOCK_WAIT even after a timeout occurred, instead of the error code DB_LOCK_WAIT_TIMEOUT. The following patch fixes the problem:
| |||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2017-08-15 ] | |||||||||||||||||||||||
|
ok to push. |