diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-10-29 20:29:43 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-10-29 20:29:43 +0200 |
commit | 716f7843757f96649cca1f5dc3df5d9659b17da9 (patch) | |
tree | 72f4916393771ab12360c104d8bea0e9b867d2f8 /sql/sql_test.cc | |
parent | 7c24e8d54d1d41374b7836e3273e7e5eaf22e2c4 (diff) | |
download | mariadb-git-716f7843757f96649cca1f5dc3df5d9659b17da9.tar.gz |
sane implementation of Key_% status variables.
Diffstat (limited to 'sql/sql_test.cc')
-rw-r--r-- | sql/sql_test.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 5c9077f86ea..541fcc155af 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -441,6 +441,9 @@ static int print_key_cache_status(const char *name, KEY_CACHE *key_cache) } else { + KEY_CACHE_STATISTICS stats; + get_key_cache_statistics(key_cache, 0, &stats); + printf("%s\n\ Buffer_size: %10lu\n\ Block_size: %10lu\n\ @@ -457,11 +460,12 @@ reads: %10s\n\n", (ulong) key_cache->param_buff_size, key_cache->param_block_size, key_cache->param_division_limit, key_cache->param_age_threshold, key_cache->param_partitions, - key_cache->blocks_used,key_cache->global_blocks_changed, - llstr(key_cache->global_cache_w_requests,llbuff1), - llstr(key_cache->global_cache_write,llbuff2), - llstr(key_cache->global_cache_r_requests,llbuff3), - llstr(key_cache->global_cache_read,llbuff4)); + (ulong)stats.blocks_used, + (ulong)stats.blocks_changed, + llstr(stats.write_requests,llbuff1), + llstr(stats.writes,llbuff2), + llstr(stats.read_requests,llbuff3), + llstr(stats.reads,llbuff4)); } return 0; } |