-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for MDEV-9679 main.delayed fails sporadically
Problem was that notify_shared_lock() didn't abort an insert delayed thread if it was in thr_upgrade_write_delay_lock(). ALTER TABLE first takes a weak_mdl_lock, then a thr_lock and then tries to upgrade the mdl_lock. Delayed insert thread first takes a mdl lock followed by a thr_upgrade_write_delay_lock() This caused insert delay to wait for alter table in thr_lock, while alter table was waiting for the mdl lock by insert delay. Fixed by telling mdl to run thr_lock_abort() for the insert delay thread table. We also set thd->mysys_var->abort to 1 for the delay thread when it's killed by alter table to ensure it doesn't ever get locked in thr_lock.
- Loading branch information
Showing
2 changed files
with
64 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters