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
0583d985
Commit
0583d985
authored
Jan 05, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: buf_get_latched_pages_number(): Count compressed-only blocks too.
parent
e81c916b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
buf/buf0buf.c
buf/buf0buf.c
+41
-0
No files found.
buf/buf0buf.c
View file @
0583d985
...
...
@@ -2879,8 +2879,10 @@ Returns the number of latched pages in the buffer pool. */
ulint
buf_get_latched_pages_number
(
void
)
/*==============================*/
{
buf_chunk_t
*
chunk
;
buf_page_t
*
b
;
ulint
i
;
ulint
fixed_pages_number
=
0
;
...
...
@@ -2913,6 +2915,45 @@ buf_get_latched_pages_number(void)
}
}
mutex_enter
(
&
buf_pool
->
zip_mutex
);
/* Traverse the lists of clean and dirty compressed-only blocks. */
for
(
b
=
UT_LIST_GET_FIRST
(
buf_pool
->
zip_clean
);
b
;
b
=
UT_LIST_GET_NEXT
(
list
,
b
))
{
ut_a
(
buf_page_get_state
(
b
)
==
BUF_BLOCK_ZIP_PAGE
);
ut_a
(
buf_page_get_io_fix
(
b
)
==
BUF_IO_NONE
);
if
(
b
->
buf_fix_count
!=
0
||
buf_page_get_io_fix
(
b
)
!=
BUF_IO_NONE
)
{
fixed_pages_number
++
;
}
}
for
(
b
=
UT_LIST_GET_FIRST
(
buf_pool
->
flush_list
);
b
;
b
=
UT_LIST_GET_NEXT
(
list
,
b
))
{
switch
(
buf_page_get_state
(
b
))
{
case
BUF_BLOCK_ZIP_DIRTY
:
if
(
b
->
buf_fix_count
!=
0
||
buf_page_get_io_fix
(
b
)
!=
BUF_IO_NONE
)
{
fixed_pages_number
++
;
}
break
;
case
BUF_BLOCK_FILE_PAGE
:
/* uncompressed page */
break
;
case
BUF_BLOCK_ZIP_FREE
:
case
BUF_BLOCK_ZIP_PAGE
:
case
BUF_BLOCK_NOT_USED
:
case
BUF_BLOCK_READY_FOR_USE
:
case
BUF_BLOCK_MEMORY
:
case
BUF_BLOCK_REMOVE_HASH
:
ut_error
;
break
;
}
}
mutex_exit
(
&
buf_pool
->
zip_mutex
);
mutex_exit
(
&
(
buf_pool
->
mutex
));
return
(
fixed_pages_number
);
...
...
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