summaryrefslogtreecommitdiff
path: root/sql/lock.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/lock.cc')
-rw-r--r--sql/lock.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index 8e91bd9360e..fbe15fde3b0 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -415,7 +415,7 @@ void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock)
THR_LOCK_DATA **lock=sql_lock->locks;
for (i=found=0 ; i < sql_lock->lock_count ; i++)
{
- if (sql_lock->locks[i]->type >= TL_WRITE_ALLOW_READ)
+ if (sql_lock->locks[i]->type > TL_WRITE_ALLOW_WRITE)
{
swap_variables(THR_LOCK_DATA *, *lock, sql_lock->locks[i]);
lock++;
@@ -435,7 +435,7 @@ void mysql_unlock_read_tables(THD *thd, MYSQL_LOCK *sql_lock)
for (i=found=0 ; i < sql_lock->table_count ; i++)
{
DBUG_ASSERT(sql_lock->table[i]->lock_position == i);
- if ((uint) sql_lock->table[i]->reginfo.lock_type >= TL_WRITE_ALLOW_READ)
+ if ((uint) sql_lock->table[i]->reginfo.lock_type > TL_WRITE_ALLOW_WRITE)
{
swap_variables(TABLE *, *table, sql_lock->table[i]);
table++;