summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authormonty@mysql.com <>2003-11-21 01:53:01 +0200
committermonty@mysql.com <>2003-11-21 01:53:01 +0200
commit8aeb63dd3bc0a7c7ec1cda701f721591929c41e3 (patch)
treed2ee92d6c747460f67b4e5c5612f5771fbc5e4c0 /myisam
parent32a62d506916c2f1ee34cb4494a10b66d1b4be2a (diff)
downloadmariadb-git-8aeb63dd3bc0a7c7ec1cda701f721591929c41e3.tar.gz
Update VC++ files
Portability fixes After merge fixes
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_keycache.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/myisam/mi_keycache.c b/myisam/mi_keycache.c
index 2c808c68c98..fc51f331d76 100644
--- a/myisam/mi_keycache.c
+++ b/myisam/mi_keycache.c
@@ -93,6 +93,11 @@ int mi_assign_to_key_cache(MI_INFO *info,
(void) flush_key_blocks(key_cache, share->kfile, FLUSH_REMOVE);
/*
+ ensure that setting the key cache and changing the multi_key_cache
+ is done atomicly
+ */
+ pthread_mutex_lock(&share->intern_lock);
+ /*
Tell all threads to use the new key cache
This should be seen at the lastes for the next call to an myisam function.
*/
@@ -102,6 +107,7 @@ int mi_assign_to_key_cache(MI_INFO *info,
if (multi_key_cache_set(share->unique_file_name, share->unique_name_length,
share->key_cache))
error= my_errno;
+ pthread_mutex_unlock(&share->intern_lock);
DBUG_RETURN(error);
}