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
f81ecc5a
Commit
f81ecc5a
authored
Dec 05, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: enum buf_page_state: Add BUF_BLOCK_ZIP_FREE, BUF_BLOCK_ZIP_DIRTY.
parent
0b88392a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
10 deletions
+36
-10
buf/buf0buf.c
buf/buf0buf.c
+7
-2
include/buf0buf.h
include/buf0buf.h
+11
-6
include/buf0buf.ic
include/buf0buf.ic
+18
-2
No files found.
buf/buf0buf.c
View file @
f81ecc5a
...
...
@@ -2360,6 +2360,8 @@ buf_validate(void)
chunk
=
buf_pool
->
chunks
;
/* TODO: check buf_pool->zip_list and buf_pool->flush_list */
for
(
i
=
buf_pool
->
n_chunks
;
i
--
;
chunk
++
)
{
ulint
j
;
...
...
@@ -2370,12 +2372,15 @@ buf_validate(void)
mutex_enter
(
&
block
->
mutex
);
switch
(
buf_block_get_state
(
block
))
{
case
BUF_BLOCK_ZIP_FREE
:
case
BUF_BLOCK_ZIP_PAGE
:
/* TODO: validate page_zip */
case
BUF_BLOCK_ZIP_DIRTY
:
/* These should only occur on
zip_clean, zip_free[], or flush_list. */
ut_error
;
break
;
case
BUF_BLOCK_FILE_PAGE
:
case
BUF_BLOCK_FILE_PAGE
:
ut_a
(
buf_page_hash_get
(
buf_block_get_space
(
block
),
buf_block_get_page_no
(
...
...
include/buf0buf.h
View file @
f81ecc5a
...
...
@@ -58,12 +58,17 @@ extern ibool buf_debug_prints;/* If this is set TRUE, the program
extern
ulint
srv_buf_pool_write_requests
;
/* variable to count write request
issued */
/* States of a control block */
/* States of a control block (@see buf_page_struct).
The enumeration values must be 0..7. */
enum
buf_page_state
{
BUF_BLOCK_ZIP_PAGE
=
1
,
/* contains a compressed page only;
must be smaller than
BUF_BLOCK_NOT_USED;
cf. buf_block_state_valid() */
BUF_BLOCK_ZIP_FREE
=
0
,
/* contains a free compressed page */
BUF_BLOCK_ZIP_PAGE
,
/* contains a clean compressed page */
BUF_BLOCK_ZIP_DIRTY
,
/* contains a compressed page that is
in the buf_pool->flush_list */
/* The constants for compressed-only pages must precede
BUF_BLOCK_NOT_USED; @see buf_block_state_valid() */
BUF_BLOCK_NOT_USED
,
/* is in the free list */
BUF_BLOCK_READY_FOR_USE
,
/* when buf_get_free_block returns
a block, it is in this state */
...
...
@@ -608,7 +613,7 @@ Gets the mutex of a block. */
UNIV_INLINE
mutex_t
*
buf_page_get_mutex
(
/*===============
=
*/
/*===============*/
/* out: pointer to mutex protecting bpage */
buf_page_t
*
bpage
)
/* in: pointer to control block */
__attribute__
((
pure
));
...
...
include/buf0buf.ic
View file @
f81ecc5a
...
...
@@ -122,7 +122,9 @@ buf_page_get_state(
#ifdef UNIV_DEBUG
switch (state) {
case BUF_BLOCK_ZIP_FREE:
case BUF_BLOCK_ZIP_PAGE:
case BUF_BLOCK_ZIP_DIRTY:
case BUF_BLOCK_NOT_USED:
case BUF_BLOCK_READY_FOR_USE:
case BUF_BLOCK_FILE_PAGE:
...
...
@@ -160,7 +162,9 @@ buf_page_set_state(
enum buf_page_state old_state = buf_page_get_state(bpage);
switch (old_state) {
case BUF_BLOCK_ZIP_FREE:
case BUF_BLOCK_ZIP_PAGE:
case BUF_BLOCK_ZIP_DIRTY:
ut_error;
break;
case BUF_BLOCK_NOT_USED:
...
...
@@ -209,7 +213,13 @@ buf_page_in_file(
const buf_page_t* bpage) /* in: pointer to control block */
{
switch (buf_page_get_state(bpage)) {
case BUF_BLOCK_ZIP_FREE:
/* This is a free page in buf_pool->zip_free[].
Such pages should only be accessed by the buddy allocator. */
ut_error;
break;
case BUF_BLOCK_ZIP_PAGE:
case BUF_BLOCK_ZIP_DIRTY:
case BUF_BLOCK_FILE_PAGE:
return(TRUE);
case BUF_BLOCK_NOT_USED:
...
...
@@ -241,12 +251,16 @@ Gets the mutex of a block. */
UNIV_INLINE
mutex_t*
buf_page_get_mutex(
/*===============
=
*/
/*===============*/
/* out: pointer to mutex protecting bpage */
buf_page_t* bpage) /* in: pointer to control block */
{
switch (buf_page_get_state(bpage)) {
case BUF_BLOCK_ZIP_FREE:
ut_error;
break;
case BUF_BLOCK_ZIP_PAGE:
case BUF_BLOCK_ZIP_DIRTY:
return(NULL); /* TODO: return common mutex for page_zip */
default:
return(&((buf_block_t*) bpage)->mutex);
...
...
@@ -442,8 +456,10 @@ buf_block_get_frame(
ut_ad(block);
#ifdef UNIV_DEBUG
switch (buf_block_get_state(block)) {
case BUF_BLOCK_
NOT_USED
:
case BUF_BLOCK_
ZIP_FREE
:
case BUF_BLOCK_ZIP_PAGE:
case BUF_BLOCK_ZIP_DIRTY:
case BUF_BLOCK_NOT_USED:
ut_error;
break;
case BUF_BLOCK_FILE_PAGE:
...
...
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