summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <davi@moksha.local>2007-08-30 16:11:53 -0300
committerunknown <davi@moksha.local>2007-08-30 16:11:53 -0300
commitbccbd5c493a5350a7dd36e0349f2ad6d05863e89 (patch)
treeeae56ec44b0a542fa700a938736de512d463d601
parent672c421b1328d97191c3ec3be476fd1323b25cdd (diff)
downloadmariadb-git-bccbd5c493a5350a7dd36e0349f2ad6d05863e89.tar.gz
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.
-rw-r--r--sql/sql_insert.cc2
1 files changed, 1 insertions, 1 deletions
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;
}