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
620df99d
Commit
620df99d
authored
Nov 28, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Enclose buf_block_t:in_LRU_list in #ifdef UNIV_DEBUG
parent
b03460d9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
buf/buf0buf.c
buf/buf0buf.c
+2
-2
buf/buf0lru.c
buf/buf0lru.c
+13
-7
include/buf0buf.h
include/buf0buf.h
+2
-0
No files found.
buf/buf0buf.c
View file @
620df99d
...
...
@@ -610,9 +610,9 @@ buf_block_init(
block
->
index
=
NULL
;
block
->
in_free_list
=
FALSE
;
block
->
in_LRU_list
=
FALSE
;
#ifdef UNIV_DEBUG
block
->
in_LRU_list
=
FALSE
;
block
->
n_pointers
=
0
;
#endif
/* UNIV_DEBUG */
page_zip_des_init
(
&
block
->
page
.
zip
);
...
...
@@ -791,7 +791,7 @@ buf_chunk_free(
ut_a
(
buf_block_get_state
(
block
)
==
BUF_BLOCK_NOT_USED
);
ut_a
(
!
block
->
page
.
zip
.
data
);
ut_a
(
!
block
->
in_LRU_list
);
ut_a
d
(
!
block
->
in_LRU_list
);
/* Remove the block from the free list. */
ut_a
(
block
->
in_free_list
);
UT_LIST_REMOVE
(
free
,
buf_pool
->
free
,
block
);
...
...
buf/buf0lru.c
View file @
620df99d
...
...
@@ -208,7 +208,7 @@ buf_LRU_free_block(
ut_ad
(
mutex_own
(
&
block
->
mutex
));
#endif
/* UNIV_SYNC_DEBUG */
ut_a
(
block
->
in_LRU_list
);
ut_a
d
(
block
->
in_LRU_list
);
if
(
!
buf_flush_ready_for_replace
(
block
))
{
...
...
@@ -444,7 +444,7 @@ loop:
UT_LIST_REMOVE
(
free
,
buf_pool
->
free
,
block
);
block
->
in_free_list
=
FALSE
;
ut_a
(
buf_block_get_state
(
block
)
!=
BUF_BLOCK_FILE_PAGE
);
ut_a
(
!
block
->
in_LRU_list
);
ut_a
d
(
!
block
->
in_LRU_list
);
if
(
buf_block_get_zip_size
(
block
)
!=
zip_size
)
{
page_zip_set_size
(
&
block
->
page
.
zip
,
zip_size
);
...
...
@@ -576,7 +576,7 @@ buf_LRU_old_adjust_len(void)
old_len
=
buf_pool
->
LRU_old_len
;
new_len
=
3
*
(
UT_LIST_GET_LEN
(
buf_pool
->
LRU
)
/
8
);
ut_a
(
buf_pool
->
LRU_old
->
in_LRU_list
);
ut_a
d
(
buf_pool
->
LRU_old
->
in_LRU_list
);
/* Update the LRU_old pointer if necessary */
...
...
@@ -621,7 +621,7 @@ buf_LRU_old_init(void)
while
(
block
!=
NULL
)
{
ut_a
(
buf_block_get_state
(
block
)
==
BUF_BLOCK_FILE_PAGE
);
ut_a
(
block
->
in_LRU_list
);
ut_a
d
(
block
->
in_LRU_list
);
block
->
old
=
TRUE
;
block
=
UT_LIST_GET_NEXT
(
LRU
,
block
);
}
...
...
@@ -647,7 +647,7 @@ buf_LRU_remove_block(
#endif
/* UNIV_SYNC_DEBUG */
ut_a
(
buf_block_get_state
(
block
)
==
BUF_BLOCK_FILE_PAGE
);
ut_a
(
block
->
in_LRU_list
);
ut_a
d
(
block
->
in_LRU_list
);
/* If the LRU_old pointer is defined and points to just this block,
move it backward one step */
...
...
@@ -667,7 +667,9 @@ buf_LRU_remove_block(
/* Remove the block from the LRU list */
UT_LIST_REMOVE
(
LRU
,
buf_pool
->
LRU
,
block
);
#ifdef UNIV_DEBUG
block
->
in_LRU_list
=
FALSE
;
#endif
/* UNIV_DEBUG */
/* If the LRU list is so short that LRU_old not defined, return */
if
(
UT_LIST_GET_LEN
(
buf_pool
->
LRU
)
<
BUF_LRU_OLD_MIN_LEN
)
{
...
...
@@ -717,9 +719,11 @@ buf_LRU_add_block_to_end_low(
block
->
LRU_position
=
buf_pool_clock_tic
();
}
ut_a
(
!
block
->
in_LRU_list
);
ut_a
d
(
!
block
->
in_LRU_list
);
UT_LIST_ADD_LAST
(
LRU
,
buf_pool
->
LRU
,
block
);
#ifdef UNIV_DEBUG
block
->
in_LRU_list
=
TRUE
;
#endif
/* UNIV_DEBUG */
if
(
UT_LIST_GET_LEN
(
buf_pool
->
LRU
)
>=
BUF_LRU_OLD_MIN_LEN
)
{
...
...
@@ -764,7 +768,7 @@ buf_LRU_add_block_low(
#endif
/* UNIV_SYNC_DEBUG */
ut_a
(
buf_block_get_state
(
block
)
==
BUF_BLOCK_FILE_PAGE
);
ut_a
(
!
block
->
in_LRU_list
);
ut_a
d
(
!
block
->
in_LRU_list
);
block
->
old
=
old
;
cl
=
buf_pool_clock_tic
();
...
...
@@ -786,7 +790,9 @@ buf_LRU_add_block_low(
block
->
LRU_position
=
(
buf_pool
->
LRU_old
)
->
LRU_position
;
}
#ifdef UNIV_DEBUG
block
->
in_LRU_list
=
TRUE
;
#endif
/* UNIV_DEBUG */
if
(
UT_LIST_GET_LEN
(
buf_pool
->
LRU
)
>
BUF_LRU_OLD_MIN_LEN
)
{
...
...
include/buf0buf.h
View file @
620df99d
...
...
@@ -794,8 +794,10 @@ struct buf_block_struct{
debugging */
UT_LIST_NODE_T
(
buf_block_t
)
LRU
;
/* node of the LRU list */
#ifdef UNIV_DEBUG
ibool
in_LRU_list
;
/* TRUE of the page is in the LRU list;
used in debugging */
#endif
/* UNIV_DEBUG */
ulint
LRU_position
;
/* value which monotonically
decreases (or may stay constant if
the block is in the old blocks) toward
...
...
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