summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2005-09-14 13:18:16 +0200
committerunknown <ingo@mysql.com>2005-09-14 13:18:16 +0200
commit5fe65297d21ed815d221699cad46e44958f74a06 (patch)
treedb8c02e8e43fdc08335f800d9e4b724cd39e6b77 /sql
parent683e228a26d8f8ea85e329e4f6f23ea625a85537 (diff)
downloadmariadb-git-5fe65297d21ed815d221699cad46e44958f74a06.tar.gz
Bug#12920 - key_read_requests counter appears to re-set
After merge fix. include/keycache.h: Bug#12920 - key_read_requests counter appears to re-set After merge fix. Status variables moved into KEY_CACHE in 4.1. Enlarging them there. include/my_sys.h: Bug#12920 - key_read_requests counter appears to re-set After merge fix. Status variables moved into KEY_CACHE in 4.1. Removed unused global variables. myisam/mi_test2.c: Bug#12920 - key_read_requests counter appears to re-set After merge fix. Status variables moved into KEY_CACHE in 4.1. Changed to print default key cache status. mysys/mf_keycache.c: Bug#12920 - key_read_requests counter appears to re-set After merge fix. Status variables moved into KEY_CACHE in 4.1. Changed their debug printout. sql/mysqld.cc: Bug#12920 - key_read_requests counter appears to re-set After merge fix. Changed to print full value. sql/sql_show.cc: Bug#12920 - key_read_requests counter appears to re-set After merge fix. Added a branch for long long values. sql/sql_test.cc: Bug#12920 - key_read_requests counter appears to re-set After merge fix. changed to print full values. sql/structs.h: Bug#12920 - key_read_requests counter appears to re-set After merge fix. Added a branch for long long keycache values.
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc8
-rw-r--r--sql/sql_show.cc4
-rw-r--r--sql/sql_test.cc19
-rw-r--r--sql/structs.h2
4 files changed, 22 insertions, 11 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 8db4b27169a..86ba437596d 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -5544,13 +5544,13 @@ struct show_var_st status_vars[]= {
{"Key_blocks_used", (char*) &dflt_key_cache_var.blocks_used,
SHOW_KEY_CACHE_CONST_LONG},
{"Key_read_requests", (char*) &dflt_key_cache_var.global_cache_r_requests,
- SHOW_KEY_CACHE_LONG},
+ SHOW_KEY_CACHE_LONGLONG},
{"Key_reads", (char*) &dflt_key_cache_var.global_cache_read,
- SHOW_KEY_CACHE_LONG},
+ SHOW_KEY_CACHE_LONGLONG},
{"Key_write_requests", (char*) &dflt_key_cache_var.global_cache_w_requests,
- SHOW_KEY_CACHE_LONG},
+ SHOW_KEY_CACHE_LONGLONG},
{"Key_writes", (char*) &dflt_key_cache_var.global_cache_write,
- SHOW_KEY_CACHE_LONG},
+ SHOW_KEY_CACHE_LONGLONG},
{"Max_used_connections", (char*) &max_used_connections, SHOW_LONG},
{"Not_flushed_delayed_rows", (char*) &delayed_rows_in_use, SHOW_LONG_CONST},
{"Open_files", (char*) &my_file_opened, SHOW_LONG_CONST},
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 7cefd89c23c..c3c28535954 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2091,6 +2091,10 @@ int mysqld_show(THD *thd, const char *wild, show_var_st *variables,
value= (value-(char*) &dflt_key_cache_var)+ (char*) dflt_key_cache;
end= int10_to_str(*(long*) value, buff, 10);
break;
+ case SHOW_KEY_CACHE_LONGLONG:
+ value= (value-(char*) &dflt_key_cache_var)+ (char*) dflt_key_cache;
+ end= longlong10_to_str(*(longlong*) value, buff, 10);
+ break;
case SHOW_UNDEF: // Show never happen
case SHOW_SYS:
break; // Return empty string
diff --git a/sql/sql_test.cc b/sql/sql_test.cc
index 8af7903a910..d6afc888be2 100644
--- a/sql/sql_test.cc
+++ b/sql/sql_test.cc
@@ -309,6 +309,11 @@ end:
static int print_key_cache_status(const char *name, KEY_CACHE *key_cache)
{
+ char llbuff1[22];
+ char llbuff2[22];
+ char llbuff3[22];
+ char llbuff4[22];
+
if (!key_cache->key_cache_inited)
{
printf("%s: Not in use\n", name);
@@ -322,16 +327,18 @@ Division_limit: %10lu\n\
Age_limit: %10lu\n\
blocks used: %10lu\n\
not flushed: %10lu\n\
-w_requests: %10lu\n\
-writes: %10lu\n\
-r_requests: %10lu\n\
-reads: %10lu\n\n",
+w_requests: %10s\n\
+writes: %10s\n\
+r_requests: %10s\n\
+reads: %10s\n\n",
name,
(ulong) key_cache->param_buff_size, key_cache->param_block_size,
key_cache->param_division_limit, key_cache->param_age_threshold,
key_cache->blocks_used,key_cache->global_blocks_changed,
- key_cache->global_cache_w_requests,key_cache->global_cache_write,
- key_cache->global_cache_r_requests,key_cache->global_cache_read);
+ 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));
}
return 0;
}
diff --git a/sql/structs.h b/sql/structs.h
index ba081b570c1..081ada88bf7 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -181,7 +181,7 @@ enum SHOW_TYPE
SHOW_SSL_GET_CIPHER_LIST,
#endif /* HAVE_OPENSSL */
SHOW_RPL_STATUS, SHOW_SLAVE_RUNNING, SHOW_SLAVE_RETRIED_TRANS,
- SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG
+ SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG, SHOW_KEY_CACHE_LONGLONG
};
enum SHOW_COMP_OPTION { SHOW_OPTION_YES, SHOW_OPTION_NO, SHOW_OPTION_DISABLED};