diff options
author | unknown <monty@donna.mysql.com> | 2000-11-20 22:25:59 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2000-11-20 22:25:59 +0200 |
commit | 166df4ee474f42487f0cdd8db4fe298f3528a1c0 (patch) | |
tree | 5390b25e6e61ec56f90e454a33b6e630e70b02a4 /mysys/thr_lock.c | |
parent | c21988993eaa0fe8d7c85e75559fbaf0d613222c (diff) | |
download | mariadb-git-166df4ee474f42487f0cdd8db4fe298f3528a1c0.tar.gz |
Fixed performance bug in lock tables
Docs/manual.texi:
Updated changelog
mysys/thr_lock.c:
Fixed bad performance bug when using SELECT, INSERT and UPDATE
strings/llstr.c:
change llstr() to output signed strings
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: |