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
5a594244
Commit
5a594244
authored
Dec 09, 2010
by
Jimmy Yang
Browse files
Options
Browse Files
Download
Plain Diff
Merge from mysql-5.1-innodb to mysql-5.5-innodb.
parents
ee12afc0
662fb84a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
storage/innobase/buf/buf0lru.c
storage/innobase/buf/buf0lru.c
+12
-4
No files found.
storage/innobase/buf/buf0lru.c
View file @
5a594244
...
...
@@ -2076,6 +2076,7 @@ buf_LRU_stat_update(void)
buf_LRU_stat_t
*
item
;
buf_pool_t
*
buf_pool
;
ibool
evict_started
=
FALSE
;
buf_LRU_stat_t
cur_stat
;
/* If we haven't started eviction yet then don't update stats. */
for
(
i
=
0
;
i
<
srv_buf_pool_instances
;
i
++
)
{
...
...
@@ -2097,12 +2098,19 @@ buf_LRU_stat_update(void)
buf_LRU_stat_arr_ind
++
;
buf_LRU_stat_arr_ind
%=
BUF_LRU_STAT_N_INTERVAL
;
/* Add the current value and subtract the obsolete entry. */
buf_LRU_stat_sum
.
io
+=
buf_LRU_stat_cur
.
io
-
item
->
io
;
buf_LRU_stat_sum
.
unzip
+=
buf_LRU_stat_cur
.
unzip
-
item
->
unzip
;
/* Add the current value and subtract the obsolete entry.
Since buf_LRU_stat_cur is not protected by any mutex,
it can be changing between adding to buf_LRU_stat_sum
and copying to item. Assign it to local variables to make
sure the same value assign to the buf_LRU_stat_sum
and item */
cur_stat
=
buf_LRU_stat_cur
;
buf_LRU_stat_sum
.
io
+=
cur_stat
.
io
-
item
->
io
;
buf_LRU_stat_sum
.
unzip
+=
cur_stat
.
unzip
-
item
->
unzip
;
/* Put current entry in the array. */
memcpy
(
item
,
&
buf_LRU_stat_cur
,
sizeof
*
item
);
memcpy
(
item
,
&
cur_stat
,
sizeof
*
item
);
func_exit:
/* Clear the current entry. */
...
...
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