diff options
author | mronstrom@mysql.com <> | 2005-07-19 00:29:19 +0200 |
---|---|---|
committer | mronstrom@mysql.com <> | 2005-07-19 00:29:19 +0200 |
commit | 2d23c691f731d4bd52a3d8247edb673613209cac (patch) | |
tree | 8cac93afd968960ab2b0e70bf1d21eaefadecd79 /mysys | |
parent | 0d7a2641b5c05a2e90ca04bb1002be1c7d63ab69 (diff) | |
download | mariadb-git-2d23c691f731d4bd52a3d8247edb673613209cac.tar.gz |
Bug #10600
remove_table_from_cache fails to signal other thread and gets
blocked when other thread also gets blocked
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/thr_lock.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index 935ed4ea282..63dbe67c68e 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -966,9 +966,10 @@ void thr_abort_locks(THR_LOCK *lock) This is used to abort all locks for a specific thread */ -void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread) +bool thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread) { THR_LOCK_DATA *data; + bool found= FALSE; DBUG_ENTER("thr_abort_locks_for_thread"); pthread_mutex_lock(&lock->mutex); @@ -978,6 +979,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread) { DBUG_PRINT("info",("Aborting read-wait lock")); data->type= TL_UNLOCK; /* Mark killed */ + found= TRUE; pthread_cond_signal(data->cond); data->cond= 0; /* Removed from list */ @@ -993,6 +995,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread) { DBUG_PRINT("info",("Aborting write-wait lock")); data->type= TL_UNLOCK; + found= TRUE; pthread_cond_signal(data->cond); data->cond= 0; @@ -1003,7 +1006,7 @@ void thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread) } } pthread_mutex_unlock(&lock->mutex); - DBUG_VOID_RETURN; + DBUG_RETURN(found); } |