summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-06-23 12:19:07 -0700
committerIgor Babaev <igor@askmonty.org>2012-06-23 12:19:07 -0700
commitd9c3a3e39e4c5a6f060b7bbc1646ca74c123fbab (patch)
tree30082dc4e34b211064304c5c8f0704465f1b121d
parent0c69f22032abd6f162829ee31c5ee7d34b84e107 (diff)
downloadmariadb-git-d9c3a3e39e4c5a6f060b7bbc1646ca74c123fbab.tar.gz
Fixed bug mdev-360.
The bug was the result of the incomplete fix for bug lp bug 1008293.
-rw-r--r--storage/myisam/mi_keycache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/storage/myisam/mi_keycache.c b/storage/myisam/mi_keycache.c
index be0cdc470f1..eed8cc666eb 100644
--- a/storage/myisam/mi_keycache.c
+++ b/storage/myisam/mi_keycache.c
@@ -75,6 +75,7 @@ int mi_assign_to_key_cache(MI_INFO *info,
in the old key cache.
*/
+ pthread_mutex_lock(&share->key_cache->op_lock);
if (flush_key_blocks(share->key_cache, share->kfile, &share->dirty_part_map,
FLUSH_RELEASE))
{
@@ -82,6 +83,7 @@ int mi_assign_to_key_cache(MI_INFO *info,
mi_print_error(info->s, HA_ERR_CRASHED);
mi_mark_crashed(info); /* Mark that table must be checked */
}
+ pthread_mutex_unlock(&share->key_cache->op_lock);
/*
Flush the new key cache for this file. This is needed to ensure