summaryrefslogtreecommitdiff
path: root/innobase/lock/lock0lock.c
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-07-12 17:14:13 +0300
committerunknown <marko@hundin.mysql.fi>2004-07-12 17:14:13 +0300
commit63c915c7b96c0d1a8429938b1ce59a3ff191f9ca (patch)
tree1ed708733051eb0ecad9dc8581aa577d948a85ad /innobase/lock/lock0lock.c
parentfbc420ba0ee7bcd951a44aefff4c771578bc9ac2 (diff)
downloadmariadb-git-63c915c7b96c0d1a8429938b1ce59a3ff191f9ca.tar.gz
InnoDB: LOCK TABLES clean-up, part 2
innobase/lock/lock0lock.c: Decrement n_lock_table_exp in lock_table_dequeue(), not elsewhere
Diffstat (limited to 'innobase/lock/lock0lock.c')
-rw-r--r--innobase/lock/lock0lock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c
index 1c82d892d5f..bc03a27c874 100644
--- a/innobase/lock/lock0lock.c
+++ b/innobase/lock/lock0lock.c
@@ -3508,6 +3508,10 @@ lock_table_dequeue(
lock = UT_LIST_GET_NEXT(un_member.tab_lock.locks, in_lock);
lock_table_remove_low(in_lock);
+
+ if (lock_get_type(in_lock) == LOCK_TABLE_EXP) {
+ in_lock->trx->n_lock_table_exp--;
+ }
/* Check if waiting locks in the queue can now be granted: grant
locks if there are no conflicting locks ahead. */
@@ -3609,7 +3613,6 @@ lock_release_off_kernel(
if (lock_get_type(lock) == LOCK_TABLE_EXP) {
ut_a(lock_get_mode(lock) == LOCK_S
|| lock_get_mode(lock) == LOCK_X);
- trx->n_lock_table_exp--;
}
}
@@ -3676,7 +3679,6 @@ lock_release_tables_off_kernel(
}
lock_table_dequeue(lock);
- trx->n_lock_table_exp--;
lock = UT_LIST_GET_LAST(trx->trx_locks);
continue;