summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIngo Struewing <ingo.struewing@sun.com>2009-09-07 18:35:37 +0200
committerIngo Struewing <ingo.struewing@sun.com>2009-09-07 18:35:37 +0200
commit1b60803282ddfd6aa082c983a774d57d3e5470c5 (patch)
tree470a73f1eea902399f74466405e0b8d56d27e661 /include
parente1d49b814335d77f0835da5a47154b99bd5ddf02 (diff)
downloadmariadb-git-1b60803282ddfd6aa082c983a774d57d3e5470c5.tar.gz
Bug#17332 - changing key_buffer_size on a running server
can crash under load Backport from 5.1. Does also include key cache fixes from: Bug 44068 (RESTORE can disable the MyISAM Key Cache) Bug 40944 (Backup: crash after myisampack)
Diffstat (limited to 'include')
-rw-r--r--include/keycache.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/keycache.h b/include/keycache.h
index 424b4086cb4..b2e959955d0 100644
--- a/include/keycache.h
+++ b/include/keycache.h
@@ -44,6 +44,7 @@ typedef struct st_keycache_wqueue
typedef struct st_key_cache
{
my_bool key_cache_inited;
+ my_bool in_resize; /* true during resize operation */
my_bool resize_in_flush; /* true during flush of resize operation */
my_bool can_be_used; /* usage of cache for read/write is allowed */
size_t key_cache_mem_size; /* specified size of the cache memory */
@@ -71,6 +72,11 @@ typedef struct st_key_cache
BLOCK_LINK *used_ins; /* ptr to the insertion block in LRU chain */
pthread_mutex_t cache_lock; /* to lock access to the cache structure */
KEYCACHE_WQUEUE resize_queue; /* threads waiting during resize operation */
+ /*
+ Waiting for a zero resize count. Using a queue for symmetry though
+ only one thread can wait here.
+ */
+ KEYCACHE_WQUEUE waiting_for_resize_cnt;
KEYCACHE_WQUEUE waiting_for_hash_link; /* waiting for a free hash link */
KEYCACHE_WQUEUE waiting_for_block; /* requests waiting for a free block */
BLOCK_LINK *changed_blocks[CHANGED_BLOCKS_HASH]; /* hash for dirty file bl.*/