MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / change_key_cache_param

Function change_key_cache_param

mysys/mf_keycache.c:696–710  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

694*/
695
696void change_key_cache_param(KEY_CACHE *keycache, uint division_limit,
697 uint age_threshold)
698{
699 DBUG_ENTER("change_key_cache_param");
700
701 keycache_pthread_mutex_lock(&keycache->cache_lock);
702 if (division_limit)
703 keycache->min_warm_blocks= (keycache->disk_blocks *
704 division_limit / 100 + 1);
705 if (age_threshold)
706 keycache->age_threshold= (keycache->disk_blocks *
707 age_threshold / 100);
708 keycache_pthread_mutex_unlock(&keycache->cache_lock);
709 DBUG_VOID_RETURN;
710}
711
712
713/*

Callers 1

resize_key_cacheFunction · 0.85

Calls 2

Tested by

no test coverage detected