summaryrefslogtreecommitdiff
path: root/storage/archive/ha_archive.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/archive/ha_archive.cc')
-rw-r--r--storage/archive/ha_archive.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc
index d18e46c08b1..1d1d6b7b743 100644
--- a/storage/archive/ha_archive.cc
+++ b/storage/archive/ha_archive.cc
@@ -1407,7 +1407,10 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
mysql_mutex_lock(&share->mutex);
if (init_archive_reader())
+ {
+ mysql_mutex_unlock(&share->mutex);
DBUG_RETURN(errno);
+ }
// now we close both our writer and our reader for the rename
if (share->archive_write_open)