From 166df4ee474f42487f0cdd8db4fe298f3528a1c0 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 20 Nov 2000 22:25:59 +0200 Subject: 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 --- mysys/thr_lock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mysys') 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: -- cgit v1.2.1