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
3b2806f4
Commit
3b2806f4
authored
Dec 19, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Add the debug function buf_pool_contains_zip() #ifdef UNIV_DEBUG.
parent
483cf9be
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
0 deletions
+71
-0
buf/buf0buf.c
buf/buf0buf.c
+59
-0
include/buf0buf.h
include/buf0buf.h
+12
-0
No files found.
buf/buf0buf.c
View file @
3b2806f4
...
@@ -704,6 +704,65 @@ buf_chunk_init(
...
@@ -704,6 +704,65 @@ buf_chunk_init(
return
(
chunk
);
return
(
chunk
);
}
}
#ifdef UNIV_DEBUG
/*************************************************************************
Finds a block in the given buffer chunk that points to a
given compressed page. */
static
buf_block_t
*
buf_chunk_contains_zip
(
/*===================*/
/* out: buffer block pointing to
the compressed page, or NULL */
buf_chunk_t
*
chunk
,
/* in: chunk being checked */
const
void
*
data
)
/* in: pointer to compressed page */
{
buf_block_t
*
block
;
ulint
i
;
ut_ad
(
buf_pool
);
#ifdef UNIV_SYNC_DEBUG
ut_a
(
mutex_own
(
&
buf_pool
->
mutex
));
#endif
/* UNIV_SYNC_DEBUG */
block
=
chunk
->
blocks
;
for
(
i
=
chunk
->
size
;
i
--
;
block
++
)
{
if
(
block
->
page
.
zip
.
data
==
data
)
{
return
(
block
);
}
}
return
(
NULL
);
}
/*************************************************************************
Finds a block in the buffer pool that points to a
given compressed page. */
buf_block_t
*
buf_pool_contains_zip
(
/*==================*/
/* out: buffer block pointing to
the compressed page, or NULL */
const
void
*
data
)
/* in: pointer to compressed page */
{
ulint
n
;
buf_chunk_t
*
chunk
=
buf_pool
->
chunks
;
for
(
n
=
buf_pool
->
n_chunks
;
n
--
;
chunk
++
)
{
buf_block_t
*
block
=
buf_chunk_contains_zip
(
chunk
,
data
);
if
(
block
)
{
return
(
block
);
}
}
return
(
NULL
);
}
#endif
/* UNIV_DEBUG */
/*************************************************************************
/*************************************************************************
Checks that all file pages in the buffer chunk are in a replaceable state. */
Checks that all file pages in the buffer chunk are in a replaceable state. */
static
static
...
...
include/buf0buf.h
View file @
3b2806f4
...
@@ -470,6 +470,18 @@ buf_block_get_lock_hash_val(
...
@@ -470,6 +470,18 @@ buf_block_get_lock_hash_val(
/* out: lock hash value */
/* out: lock hash value */
const
buf_block_t
*
block
)
/* in: block */
const
buf_block_t
*
block
)
/* in: block */
__attribute__
((
pure
));
__attribute__
((
pure
));
#ifdef UNIV_DEBUG
/*************************************************************************
Finds a block in the buffer pool that points to a
given compressed page. */
buf_block_t
*
buf_pool_contains_zip
(
/*==================*/
/* out: buffer block pointing to
the compressed page, or NULL */
const
void
*
data
);
/* in: pointer to compressed page */
#endif
/* UNIV_DEBUG */
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/*************************************************************************
/*************************************************************************
Validates the buffer pool data structure. */
Validates the buffer pool data structure. */
...
...
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