Commit 1180c22a authored by davi@moksha.local's avatar davi@moksha.local

Bug#28587 SELECT is blocked by INSERT waiting on read lock, even with low_priority_updates

The problem is that a SELECT on one thread is blocked by INSERT ... ON
DUPLICATE KEY UPDATE on another thread even when low_priority_updates is
activated.

The solution is to possibly downgrade the lock type to the setting of
low_priority_updates if the INSERT cannot be concurrent.
parent f51c6acc
......@@ -417,7 +417,7 @@ void upgrade_lock_type(THD *thd, thr_lock_type *lock_type,
if (duplic == DUP_UPDATE ||
duplic == DUP_REPLACE && *lock_type == TL_WRITE_CONCURRENT_INSERT)
{
*lock_type= TL_WRITE;
*lock_type= TL_WRITE_DEFAULT;
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment