diff options
author | monty@donna.mysql.com <> | 2000-11-20 22:25:59 +0200 |
---|---|---|
committer | monty@donna.mysql.com <> | 2000-11-20 22:25:59 +0200 |
commit | d43b4a2ae1a5b2fd729477ce5ea02537c227e5f2 (patch) | |
tree | 5390b25e6e61ec56f90e454a33b6e630e70b02a4 /mysys/thr_lock.c | |
parent | b355c2e99315e8a5863ad70002e8541015b24d2a (diff) | |
download | mariadb-git-d43b4a2ae1a5b2fd729477ce5ea02537c227e5f2.tar.gz |
Fixed performance bug in lock tables
Diffstat (limited to 'mysys/thr_lock.c')
-rw-r--r-- | mysys/thr_lock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index b9a9d5274ee..5c48ad435a4 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -653,7 +653,7 @@ void thr_unlock(THR_LOCK_DATA *data) data->type=TL_UNLOCK; /* Mark unlocked */ check_locks(lock,"after releasing lock",1); - if (!lock->write.data) /* If no active read locks */ + if (!lock->write.data) /* If no active write locks */ { data=lock->write_wait.data; if (!lock->read.data) /* If no more locks in use */ @@ -742,7 +742,7 @@ void thr_unlock(THR_LOCK_DATA *data) data->next->prev= data->prev; else lock->write_wait.last=data->prev; - (*lock->write.last)=data; /* Put in execute list */ + (*lock->write.last)=data; /* Put in execute list */ data->prev=lock->write.last; lock->write.last= &data->next; data->next=0; /* Only one write lock */ @@ -756,7 +756,7 @@ void thr_unlock(THR_LOCK_DATA *data) (lock_type == TL_WRITE_CONCURRENT_INSERT || lock_type == TL_WRITE_ALLOW_WRITE)); } - else if (lock->read_wait.data) + else if (!data && lock->read_wait.data) free_all_read_locks(lock,0); } end: |