summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2003-11-21 01:53:01 +0200
committerunknown <monty@mysql.com>2003-11-21 01:53:01 +0200
commit3ca0fa152506f7b28fe9a960409859abb1b4958c (patch)
treed2ee92d6c747460f67b4e5c5612f5771fbc5e4c0 /myisam
parented63732bb3068a482aad6c89f08879973c8beaea (diff)
downloadmariadb-git-3ca0fa152506f7b28fe9a960409859abb1b4958c.tar.gz
Update VC++ files
Portability fixes After merge fixes VC++Files/mysql.dsw: Added dependencys VC++Files/mysys/mysys.dsp: Add missing files client/mysqlcheck.c: Added comment client/mysqltest.c: Remove not used variables include/keycache.h: Removed not used element include/m_ctype.h: Portability fix include/my_base.h: Removed not used define myisam/mi_keycache.c: Added mutex for extra safety mysql-test/r/count_distinct3.result: Faster test mysql-test/r/rpl_change_master.result: updated results mysql-test/t/count_distinct3.test: Faster test mysql-test/t/rpl_change_master.test: Make test repeatable mysys/default.c: Remove compiler warning mysys/mf_keycache.c: Removed not used 'action' element mysys/my_getopt.c: Remove not used variable sql/ha_myisam.cc: Remove compiler warning sql/item.cc: Fixed wrong patch from last changeset sql/item_timefunc.cc: Remove compiler warnings sql/set_var.cc: Remove compiler warnings sql/sql_prepare.cc: Remove not used variables sql/sql_repl.cc: After merge fix sql/sql_select.h: Added comments sql/sql_table.cc: Remove not used define strings/ctype-tis620.c: Remove not used variables
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);
}