diff options
Diffstat (limited to 'storage/myisam/mi_extra.c')
-rw-r--r-- | storage/myisam/mi_extra.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/storage/myisam/mi_extra.c b/storage/myisam/mi_extra.c index c10bf61a477..194ad5bf07a 100644 --- a/storage/myisam/mi_extra.c +++ b/storage/myisam/mi_extra.c @@ -332,7 +332,11 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) if (!share->temporary) flush_key_blocks(share->key_cache, share->kfile, &share->dirty_part_map, FLUSH_KEEP); + mysql_mutex_lock(&share->intern_lock); + /* Tell mi_lock_database() that we locked the intern_lock mutex */ + info->intern_lock_locked= 1; _mi_decrement_open_count(info); + info->intern_lock_locked= 0; if (share->not_flushed) { share->not_flushed=0; @@ -349,6 +353,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) } if (share->base.blobs) mi_alloc_rec_buff(info, -1, &info->rec_buff); + mysql_mutex_unlock(&share->intern_lock); break; case HA_EXTRA_NORMAL: /* Theese isn't in use */ info->quick_mode=0; |