Commit bca7cdf5 authored by unknown's avatar unknown

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.


sql/sql_insert.cc:
  Possibly downgrade lock type to the the setting of low_priority_updates if
  if the INSERT cannot be concurrent.
parent 6d0145d2
......@@ -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