summaryrefslogtreecommitdiff
path: root/storage/myisam/mi_keycache.c
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2010-02-16 08:41:11 -0800
committerIgor Babaev <igor@askmonty.org>2010-02-16 08:41:11 -0800
commit7e4d89c97379249ace6633bc406ff2ec2418252a (patch)
treedc84b4cc035110c628b938857226612fe3fac18d /storage/myisam/mi_keycache.c
parentabb87914ecb4caa1becce4fc4d30c110a6b2c041 (diff)
downloadmariadb-git-7e4d89c97379249ace6633bc406ff2ec2418252a.tar.gz
WL#86: Partitioned key cache for MyISAM.
This is the base patch for the task.
Diffstat (limited to 'storage/myisam/mi_keycache.c')
-rw-r--r--storage/myisam/mi_keycache.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/myisam/mi_keycache.c b/storage/myisam/mi_keycache.c
index 5cf3fede1ae..be0cdc470f1 100644
--- a/storage/myisam/mi_keycache.c
+++ b/storage/myisam/mi_keycache.c
@@ -75,7 +75,8 @@ int mi_assign_to_key_cache(MI_INFO *info,
in the old key cache.
*/
- if (flush_key_blocks(share->key_cache, share->kfile, FLUSH_RELEASE))
+ if (flush_key_blocks(share->key_cache, share->kfile, &share->dirty_part_map,
+ FLUSH_RELEASE))
{
error= my_errno;
mi_print_error(info->s, HA_ERR_CRASHED);
@@ -90,7 +91,8 @@ int mi_assign_to_key_cache(MI_INFO *info,
(This can never fail as there is never any not written data in the
new key cache)
*/
- (void) flush_key_blocks(key_cache, share->kfile, FLUSH_RELEASE);
+ (void) flush_key_blocks(key_cache, share->kfile, &share->dirty_part_map,
+ FLUSH_RELEASE);
/*
ensure that setting the key cache and changing the multi_key_cache
@@ -102,6 +104,7 @@ int mi_assign_to_key_cache(MI_INFO *info,
This should be seen at the lastes for the next call to an myisam function.
*/
share->key_cache= key_cache;
+ share->dirty_part_map= 0;
/* store the key cache in the global hash structure for future opens */
if (multi_key_cache_set((uchar*) share->unique_file_name,