summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-02-03 15:16:24 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-02-03 15:16:24 -0200
commitbc03c9ef19c567fa26ecb2a2e35c3b49b241b101 (patch)
tree92425f34a3715e0a3c30f08403d0fe6cdd27d0b6 /include
parent6fb2ba1c3df9cc6a98a0a0fcd836f1cf38fcf692 (diff)
downloadmariadb-git-bc03c9ef19c567fa26ecb2a2e35c3b49b241b101.tar.gz
Bug#40536: SELECT is blocked by INSERT DELAYED waiting on
upgrading lock, even with low_priority_updates The problem is that there is no mechanism to control whether a delayed insert takes a high or low priority lock on a table. The solution is to modify the delayed insert thread ("handler") to take into account the global value of low_priority_updates when taking table locks. The value of low_priority_updates is retrieved when the insert delayed thread is created and will remain the same for the duration of the thread.
Diffstat (limited to 'include')
-rw-r--r--include/thr_lock.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/thr_lock.h b/include/thr_lock.h
index c7754ada299..e409df30972 100644
--- a/include/thr_lock.h
+++ b/include/thr_lock.h
@@ -159,7 +159,8 @@ void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock);
my_bool thr_abort_locks_for_thread(THR_LOCK *lock, my_thread_id thread);
void thr_print_locks(void); /* For debugging */
-my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data);
+my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data,
+ enum thr_lock_type new_lock_type);
void thr_downgrade_write_lock(THR_LOCK_DATA *data,
enum thr_lock_type new_lock_type);
my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data);