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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f11423bc
Commit
f11423bc
authored
17 years ago
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
e24afbc3
Branches unavailable
Tags unavailable
No related merge requests found
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 @
f11423bc
...
@@ -2879,8 +2879,10 @@ Returns the number of latched pages in the buffer pool. */
...
@@ -2879,8 +2879,10 @@ Returns the number of latched pages in the buffer pool. */
ulint
ulint
buf_get_latched_pages_number
(
void
)
buf_get_latched_pages_number
(
void
)
/*==============================*/
{
{
buf_chunk_t
*
chunk
;
buf_chunk_t
*
chunk
;
buf_page_t
*
b
;
ulint
i
;
ulint
i
;
ulint
fixed_pages_number
=
0
;
ulint
fixed_pages_number
=
0
;
...
@@ -2913,6 +2915,45 @@ buf_get_latched_pages_number(void)
...
@@ -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
));
mutex_exit
(
&
(
buf_pool
->
mutex
));
return
(
fixed_pages_number
);
return
(
fixed_pages_number
);
...
...
This diff is collapsed.
Click to expand it.
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