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
ee321e80
Commit
ee321e80
authored
Dec 09, 2010
by
Jimmy Yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Bug #57600 output of I/O sum[%lu] can go negative
rb://532
approved by Sunny Bains
parent
4184feef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
storage/innodb_plugin/ChangeLog
storage/innodb_plugin/ChangeLog
+4
-0
storage/innodb_plugin/buf/buf0lru.c
storage/innodb_plugin/buf/buf0lru.c
+12
-4
No files found.
storage/innodb_plugin/ChangeLog
View file @
ee321e80
2010-12-09 The InnoDB Team
* buf/buf0lru.c:
Fix Bug#57600 output of I/O sum[%lu] can go negative
2010-11-11 The InnoDB Team
* thr/thr0loc.c, trx/trx0i_s.c:
Fix Bug#57802 Empty ASSERTION parameter passed to the HASH_SEARCH macro
...
...
storage/innodb_plugin/buf/buf0lru.c
View file @
ee321e80
...
...
@@ -1942,6 +1942,7 @@ buf_LRU_stat_update(void)
/*=====================*/
{
buf_LRU_stat_t
*
item
;
buf_LRU_stat_t
cur_stat
;
/* If we haven't started eviction yet then don't update stats. */
if
(
buf_pool
->
freed_page_clock
==
0
)
{
...
...
@@ -1955,12 +1956,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
);
buf_pool_mutex_exit
();
...
...
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