63
65
bool resize_in_flush; /* true during flush of resize operation */
64
66
bool can_be_used; /* usage of cache for read/write is allowed */
65
67
uint32_t hash_entries; /* max number of entries in the hash table */
66
size_t key_cache_mem_size; /* specified size of the cache memory */
68
uint32_t key_cache_mem_size; /* specified size of the cache memory */
67
69
uint32_t key_cache_block_size; /* size of the page buffer of a cache block */
68
70
int disk_blocks; /* max number of blocks in the cache */
69
71
ulong min_warm_blocks; /* min number of warm blocks; */
102
104
initializing the key cache.
105
uint64_t param_buff_size; /* size the memory allocated for the cache */
107
uint32_t param_buff_size; /* size the memory allocated for the cache */
106
108
uint32_t param_block_size; /* size of the blocks in the key cache */
107
109
uint32_t param_division_limit; /* min. percentage of warm blocks */
108
110
uint32_t param_age_threshold; /* determines when hot block is downgraded */
122
124
extern KEY_CACHE dflt_key_cache_var, *dflt_key_cache;
124
126
extern int init_key_cache(KEY_CACHE *keycache, uint32_t key_cache_block_size,
125
size_t use_mem, uint32_t division_limit,
127
uint32_t use_mem, uint32_t division_limit,
126
128
uint32_t age_threshold);
127
129
extern int resize_key_cache(KEY_CACHE *keycache, uint32_t key_cache_block_size,
128
size_t use_mem, uint32_t division_limit,
130
uint32_t use_mem, uint32_t division_limit,
129
131
uint32_t age_threshold);
130
132
extern unsigned char *key_cache_read(KEY_CACHE *keycache,
131
File file, my_off_t filepos, int level,
133
int file, my_off_t filepos, int level,
132
134
unsigned char *buff, uint32_t length,
133
135
uint32_t block_length,int return_buffer);
134
136
extern int key_cache_insert(KEY_CACHE *keycache,
135
File file, my_off_t filepos, int level,
137
int file, my_off_t filepos, int level,
136
138
unsigned char *buff, uint32_t length);
137
139
extern int key_cache_write(KEY_CACHE *keycache,
138
File file, my_off_t filepos, int level,
140
int file, my_off_t filepos, int level,
139
141
unsigned char *buff, uint32_t length,
140
142
uint32_t block_length,int force_write);
141
143
extern int flush_key_blocks(KEY_CACHE *keycache,