diff options
Diffstat (limited to 'mysys/thr_mutex.c')
-rw-r--r-- | mysys/thr_mutex.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c index fdc25b67049..86a7ce9684b 100644 --- a/mysys/thr_mutex.c +++ b/mysys/thr_mutex.c @@ -171,16 +171,16 @@ static int safe_mutex_lazy_init_deadlock_detection(safe_mutex_t *mp) pthread_mutex_lock(&THR_LOCK_mutex); mp->id= ++safe_mutex_id; pthread_mutex_unlock(&THR_LOCK_mutex); - my_hash_init(mp->locked_mutex, &my_charset_bin, - 1000, - offsetof(safe_mutex_deadlock_t, id), - sizeof(mp->id), - 0, 0, HASH_UNIQUE); - my_hash_init(mp->used_mutex, &my_charset_bin, - 1000, - offsetof(safe_mutex_t, id), - sizeof(mp->id), - 0, 0, HASH_UNIQUE); + my_hash_init2(mp->locked_mutex, 64, &my_charset_bin, + 128, + offsetof(safe_mutex_deadlock_t, id), + sizeof(mp->id), + 0, 0, HASH_UNIQUE); + my_hash_init2(mp->used_mutex, 64, &my_charset_bin, + 128, + offsetof(safe_mutex_t, id), + sizeof(mp->id), + 0, 0, HASH_UNIQUE); return 0; } @@ -711,12 +711,6 @@ void safe_mutex_end(FILE *file __attribute__((unused))) #endif /* SAFE_MUTEX_DETECT_DESTROY */ } -safe_mutex_t **my_thread_var_mutex_in_use() -{ - struct st_my_thread_var *tmp= my_thread_var; - return tmp ? &tmp->mutex_in_use : 0; -} - static my_bool add_used_to_locked_mutex(safe_mutex_t *used_mutex, safe_mutex_deadlock_t *locked_mutex) { |