From bccbd5c493a5350a7dd36e0349f2ad6d05863e89 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 30 Aug 2007 16:11:53 -0300 Subject: [PATCH] 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. --- sql/sql_insert.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index bd21d929291..f07af393070 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -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; }