mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#17332 - changing key_buffer_size on a running server
can crash under load Resizing a key cache while it was in heavy use could crash the server. There were several race conditions. I reworked some of the algorithms to fix the race conditions. No test case. Repeating the crashes requires heavy concurrent load on the key cache. A test script is attached to the bug report. More explanations to the changes are contained in a text file attached to the bug report.
This commit is contained in:
@ -2716,8 +2716,8 @@ int ha_init_key_cache(const char *name, KEY_CACHE *key_cache)
|
||||
if (!key_cache->key_cache_inited)
|
||||
{
|
||||
pthread_mutex_lock(&LOCK_global_system_variables);
|
||||
long tmp_buff_size= (long) key_cache->param_buff_size;
|
||||
long tmp_block_size= (long) key_cache->param_block_size;
|
||||
ulong tmp_buff_size= (ulong) key_cache->param_buff_size;
|
||||
uint tmp_block_size= (uint) key_cache->param_block_size;
|
||||
uint division_limit= key_cache->param_division_limit;
|
||||
uint age_threshold= key_cache->param_age_threshold;
|
||||
pthread_mutex_unlock(&LOCK_global_system_variables);
|
||||
|
Reference in New Issue
Block a user