Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
e0d668ba
Commit
e0d668ba
authored
Sep 14, 2005
by
ingo@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/mydev/mysql-5.0
into mysql.com:/home/mydev/mysql-5.0-5000
parents
129c9817
e564b723
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
29 deletions
+40
-29
include/keycache.h
include/keycache.h
+4
-4
include/my_sys.h
include/my_sys.h
+0
-3
myisam/mi_test2.c
myisam/mi_test2.c
+7
-5
mysys/mf_keycache.c
mysys/mf_keycache.c
+7
-6
sql/mysqld.cc
sql/mysqld.cc
+4
-4
sql/sql_show.cc
sql/sql_show.cc
+4
-0
sql/sql_test.cc
sql/sql_test.cc
+13
-6
sql/structs.h
sql/structs.h
+1
-1
No files found.
include/keycache.h
View file @
e0d668ba
...
...
@@ -90,10 +90,10 @@ typedef struct st_key_cache
/* 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
*/
ulong
long
global_cache_w_requests
;
/* number of write requests (write hits)
*/
ulong
long
global_cache_write
;
/* number of writes from cache to files
*/
ulong
long
global_cache_r_requests
;
/* number of read requests (read hits)
*/
ulong
long
global_cache_read
;
/* number of reads from files to cache
*/
int
blocks
;
/* max number of blocks in the cache */
my_bool
in_init
;
/* Set to 1 in MySQL during init/resize */
...
...
include/my_sys.h
View file @
e0d668ba
...
...
@@ -237,9 +237,6 @@ extern CHARSET_INFO *all_charsets[256];
extern
CHARSET_INFO
compiled_charsets
[];
/* statistics */
extern
ulong
my_cache_w_requests
,
my_cache_write
,
my_cache_r_requests
,
my_cache_read
;
extern
ulong
my_blocks_used
,
my_blocks_changed
;
extern
ulong
my_file_opened
,
my_stream_opened
,
my_tmp_file_created
;
extern
uint
mysys_usage_id
;
extern
my_bool
my_init_done
;
...
...
myisam/mi_test2.c
View file @
e0d668ba
...
...
@@ -831,17 +831,19 @@ end:
puts
(
"Locking used"
);
if
(
use_blob
)
puts
(
"blobs used"
);
#if 0
printf
(
"key cache status:
\n
\
blocks used:%10lu
\n
\
not flushed:%10lu
\n
\
w_requests: %10lu
\n
\
writes: %10lu
\n
\
r_requests: %10lu
\n
\
reads: %10lu
\n
"
,
my_blocks_used,
my_cache_w_requests, my_cache_write,
my_cache_r_requests, my_cache_read);
#endif
dflt_key_cache
->
blocks_used
,
dflt_key_cache
->
global_blocks_changed
,
(
ulong
)
dflt_key_cache
->
global_cache_w_requests
,
(
ulong
)
dflt_key_cache
->
global_cache_write
,
(
ulong
)
dflt_key_cache
->
global_cache_r_requests
,
(
ulong
)
dflt_key_cache
->
global_cache_read
);
}
end_key_cache
(
dflt_key_cache
,
1
);
if
(
blob_buffer
)
...
...
mysys/mf_keycache.c
View file @
e0d668ba
...
...
@@ -632,12 +632,13 @@ void end_key_cache(KEY_CACHE *keycache, my_bool cleanup)
keycache
->
blocks_changed
=
0
;
}
DBUG_PRINT
(
"status"
,
(
"used: %d changed: %d w_requests: %ld \
writes: %ld r_requests: %ld reads: %ld"
,
DBUG_PRINT
(
"status"
,
(
"used: %d changed: %d w_requests: %lu "
"writes: %lu r_requests: %lu reads: %lu"
,
keycache
->
blocks_used
,
keycache
->
global_blocks_changed
,
keycache
->
global_cache_w_requests
,
keycache
->
global_cache_write
,
keycache
->
global_cache_r_requests
,
keycache
->
global_cache_read
));
(
ulong
)
keycache
->
global_cache_w_requests
,
(
ulong
)
keycache
->
global_cache_write
,
(
ulong
)
keycache
->
global_cache_r_requests
,
(
ulong
)
keycache
->
global_cache_read
));
if
(
cleanup
)
{
...
...
sql/mysqld.cc
View file @
e0d668ba
...
...
@@ -5880,10 +5880,10 @@ struct show_var_st status_vars[]= {
{
"Key_blocks_not_flushed"
,
(
char
*
)
&
dflt_key_cache_var
.
global_blocks_changed
,
SHOW_KEY_CACHE_LONG
},
{
"Key_blocks_unused"
,
(
char
*
)
&
dflt_key_cache_var
.
blocks_unused
,
SHOW_KEY_CACHE_CONST_LONG
},
{
"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
},
{
"Key_reads"
,
(
char
*
)
&
dflt_key_cache_var
.
global_cache_read
,
SHOW_KEY_CACHE_LONG
},
{
"Key_write_requests"
,
(
char
*
)
&
dflt_key_cache_var
.
global_cache_w_requests
,
SHOW_KEY_CACHE_LONG
},
{
"Key_writes"
,
(
char
*
)
&
dflt_key_cache_var
.
global_cache_write
,
SHOW_KEY_CACHE_LONG
},
{
"Key_read_requests"
,
(
char
*
)
&
dflt_key_cache_var
.
global_cache_r_requests
,
SHOW_KEY_CACHE_LONG
LONG
},
{
"Key_reads"
,
(
char
*
)
&
dflt_key_cache_var
.
global_cache_read
,
SHOW_KEY_CACHE_LONG
LONG
},
{
"Key_write_requests"
,
(
char
*
)
&
dflt_key_cache_var
.
global_cache_w_requests
,
SHOW_KEY_CACHE_LONG
LONG
},
{
"Key_writes"
,
(
char
*
)
&
dflt_key_cache_var
.
global_cache_write
,
SHOW_KEY_CACHE_LONG
LONG
},
{
"Last_query_cost"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
last_query_cost
),
SHOW_DOUBLE_STATUS
},
{
"Max_used_connections"
,
(
char
*
)
&
max_used_connections
,
SHOW_LONG
},
#ifdef HAVE_NDBCLUSTER_DB
...
...
sql/sql_show.cc
View file @
e0d668ba
...
...
@@ -1628,6 +1628,10 @@ static bool show_status_array(THD *thd, const char *wild,
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
...
...
sql/sql_test.cc
View file @
e0d668ba
...
...
@@ -408,6 +408,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
);
...
...
@@ -421,16 +426,18 @@ Division_limit: %10lu\n\
Age_limit: %10lu
\n
\
blocks used: %10lu
\n
\
not flushed: %10lu
\n
\
w_requests: %10
lu
\n
\
writes: %10
lu
\n
\
r_requests: %10
lu
\n
\
reads: %10
lu
\n\n
"
,
w_requests: %10
s
\n
\
writes: %10
s
\n
\
r_requests: %10
s
\n
\
reads: %10
s
\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
;
}
...
...
sql/structs.h
View file @
e0d668ba
...
...
@@ -186,7 +186,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
,
SHOW_LONG_STATUS
,
SHOW_LONG_CONST_STATUS
,
SHOW_SLAVE_SKIP_ERRORS
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment