diff options
author | unknown <marko@hundin.mysql.fi> | 2004-07-13 12:30:34 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-07-13 12:30:34 +0300 |
commit | 8a09200240f62bf7b1874cbe10c239a356e1a58b (patch) | |
tree | 08e697dc045e132827b18b6738f179839d34e507 /innobase | |
parent | ed4e47a6a477ca74a28e13ed776e144274050645 (diff) | |
download | mariadb-git-8a09200240f62bf7b1874cbe10c239a356e1a58b.tar.gz |
lock0lock.c:
Decrement n_lock_table_exp in lock_table_remove_low()
instead of lock_table_dequeue().
Do not empty lock_heap in lock_release_tables_off_kernel().
innobase/lock/lock0lock.c:
Decrement n_lock_table_exp in lock_table_remove_low()
instead of lock_table_dequeue().
Do not empty lock_heap in lock_release_tables_off_kernel().
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/lock/lock0lock.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c index bc03a27c874..68dd2aa18c1 100644 --- a/innobase/lock/lock0lock.c +++ b/innobase/lock/lock0lock.c @@ -3202,7 +3202,7 @@ lock_table_create( lock->type_mode = type_mode | LOCK_TABLE; lock->trx = trx; - if ((lock->type_mode & LOCK_TABLE_EXP) == LOCK_TABLE_EXP) { + if (lock_get_type(lock) == LOCK_TABLE_EXP) { lock->trx->n_lock_table_exp++; } @@ -3241,7 +3241,11 @@ lock_table_remove_low( if (lock == trx->auto_inc_lock) { trx->auto_inc_lock = NULL; } - + + if (lock_get_type(lock) == LOCK_TABLE_EXP) { + lock->trx->n_lock_table_exp--; + } + UT_LIST_REMOVE(trx_locks, trx->trx_locks, lock); UT_LIST_REMOVE(un_member.tab_lock.locks, table->locks, lock); } @@ -3509,10 +3513,6 @@ lock_table_dequeue( 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. */ @@ -3698,8 +3698,6 @@ lock_release_tables_off_kernel( lock = UT_LIST_GET_PREV(trx_locks, lock); } - mem_heap_empty(trx->lock_heap); - ut_a(trx->n_lock_table_exp == 0); } |