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.
This commit is contained in:
davi@moksha.local 2007-08-30 16:11:53 -03:00
parent f51c6acc37
commit 1180c22aef

View File

@ -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;
}