diff options
author | Michael Widenius <monty@askmonty.org> | 2013-03-26 00:03:13 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2013-03-26 00:03:13 +0200 |
commit | 068c61978e3a81836d52b8caf11e044290159ad1 (patch) | |
tree | 2cbca861ab2cebe3bd99379ca9668bb483ca0d2a /storage/myisam/mi_close.c | |
parent | 35bc8f9f4353b64da215e52ff6f1612a8ce66f43 (diff) | |
download | mariadb-git-068c61978e3a81836d52b8caf11e044290159ad1.tar.gz |
Temporary commit of 10.0-merge
Diffstat (limited to 'storage/myisam/mi_close.c')
-rw-r--r-- | storage/myisam/mi_close.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/storage/myisam/mi_close.c b/storage/myisam/mi_close.c index e58c2e0f189..f0a82bcef04 100644 --- a/storage/myisam/mi_close.c +++ b/storage/myisam/mi_close.c @@ -31,7 +31,8 @@ int mi_close(register MI_INFO *info) (long) info, (uint) share->reopen, (uint) share->tot_locks)); - mysql_mutex_lock(&THR_LOCK_myisam); + if (info->open_list.data) + mysql_mutex_lock(&THR_LOCK_myisam); if (info->lock_type == F_EXTRA_LCK) info->lock_type=F_UNLCK; /* HA_EXTRA_NO_USER_CHANGE */ @@ -54,7 +55,8 @@ int mi_close(register MI_INFO *info) info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED); } flag= !--share->reopen; - myisam_open_list=list_delete(myisam_open_list,&info->open_list); + if (info->open_list.data) + myisam_open_list= list_delete(myisam_open_list, &info->open_list); mysql_mutex_unlock(&share->intern_lock); my_free(mi_get_rec_buff_ptr(info, info->rec_buff)); @@ -111,7 +113,8 @@ int mi_close(register MI_INFO *info) } my_free(info->s); } - mysql_mutex_unlock(&THR_LOCK_myisam); + if (info->open_list.data) + mysql_mutex_unlock(&THR_LOCK_myisam); if (info->ftparser_param) { my_free(info->ftparser_param); |