diff options
author | unknown <timour@mysql.com> | 2005-01-19 12:55:54 +0200 |
---|---|---|
committer | unknown <timour@mysql.com> | 2005-01-19 12:55:54 +0200 |
commit | 8e1e1e73d811d4090255b49128ffa697163b2e1d (patch) | |
tree | 75bcf07f1651331afc8970e24f80afa45a0bdead /include/keycache.h | |
parent | 49ab428c8ddc0cbafb99cb10ee77167081a23914 (diff) | |
download | mariadb-git-8e1e1e73d811d4090255b49128ffa697163b2e1d.tar.gz |
Final patch for BUG#4285.
This patch collects all previous patches into one.
The main problem was due to that there is are two variables -
dflt_key_cache and sql_key_cache with have more or less duplicate
function. The reson for the bug was that the default value in the key
cache hash was set to dflt_key_cache, then sql_key_cache was set to a
new key cache object, and then dflt_key_cache was set to sql_key_cache
which was different from the dflt_key_cache_var. After sending SIGHUP,
the server was using the original default value for the key cache hash,
which was different from the actual key cache object used for the
default key cache.
include/keycache.h:
Import patch 4285.diff
mysys/mf_keycache.c:
Import patch 4285.diff
sql/mysql_priv.h:
Import patch 4285.diff
sql/mysqld.cc:
Import patch 4285.diff
sql/set_var.cc:
Import patch 4285.diff
sql/sql_parse.cc:
Import patch 4285.diff
sql/sql_show.cc:
Import patch 4285.diff
Diffstat (limited to 'include/keycache.h')
-rw-r--r-- | include/keycache.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/keycache.h b/include/keycache.h index 26ee0ccadb1..a292a69b0a3 100644 --- a/include/keycache.h +++ b/include/keycache.h @@ -88,12 +88,13 @@ typedef struct st_key_cache ulong param_division_limit; /* min. percentage of warm blocks */ ulong param_age_threshold; /* determines when hot block is downgraded */ - /* Statistics variables */ + /* Statistics variables. These are reset in reset_key_cache_counters(). */ ulong global_blocks_changed; /* number of currently dirty blocks */ ulong global_cache_w_requests;/* number of write requests (write hits) */ ulong global_cache_write; /* number of writes from the cache to files */ ulong global_cache_r_requests;/* number of read requests (read hits) */ ulong global_cache_read; /* number of reads from files to the cache */ + int blocks; /* max number of blocks in the cache */ my_bool in_init; /* Set to 1 in MySQL during init/resize */ } KEY_CACHE; @@ -132,5 +133,7 @@ extern my_bool multi_key_cache_set(const byte *key, uint length, KEY_CACHE *key_cache); extern void multi_key_cache_change(KEY_CACHE *old_data, KEY_CACHE *new_data); +extern int reset_key_cache_counters(const char *name, + KEY_CACHE *key_cache); C_MODE_END #endif /* _keycache_h */ |