diff options
author | Igor Babaev <igor@askmonty.org> | 2012-03-01 14:22:22 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-03-01 14:22:22 -0800 |
commit | 8b469eb5151cb1b7da00cee3a7b42c10bd7ff51e (patch) | |
tree | a2dd09bd1fd3ba15b098eebf8b581bef7664b212 /mysys | |
parent | 29b0b0b5de46c6950b8b53314c74f6f458ba1a98 (diff) | |
parent | 000deedf3b708681951af6a0629af89c1f5ee85a (diff) | |
download | mariadb-git-8b469eb5151cb1b7da00cee3a7b42c10bd7ff51e.tar.gz |
Merge 5.3->5.5.
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/mf_keycache.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index b65e230c9a2..e4488318ffd 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -5903,6 +5903,10 @@ int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size, ((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->partitions : 0; DBUG_ASSERT(partitions <= MAX_KEY_CACHE_PARTITIONS); + keycache->key_cache_mem_size= + keycache->partitions ? + ((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->key_cache_mem_size : + ((SIMPLE_KEY_CACHE_CB *) keycache_cb)->key_cache_mem_size; if (blocks > 0) keycache->can_be_used= 1; return blocks; @@ -5966,6 +5970,11 @@ int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size, ((PARTITIONED_KEY_CACHE_CB *)(keycache->keycache_cb))->partitions; } + keycache->key_cache_mem_size= + keycache->partitions ? + ((PARTITIONED_KEY_CACHE_CB *)(keycache->keycache_cb))->key_cache_mem_size : + ((SIMPLE_KEY_CACHE_CB *)(keycache->keycache_cb))->key_cache_mem_size; + keycache->can_be_used= (blocks >= 0); } return blocks; |