-
Davi Arnaut authored
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. include/thr_lock.h: Update prototype. mysql-test/r/delayed.result: Add test case result for Bug#40536 mysql-test/t/delayed.test: Add test case for Bug#40536 mysys/thr_lock.c: Add function parameter which specifies the write lock type. sql/sql_insert.cc: Take a low priority write lock if global value of low_priority_updates was ON when the thread was created.
c9dc936a