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
c5fd0ac4
Commit
c5fd0ac4
authored
Feb 04, 2009
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: buf_block_align(): Fix a bogus debug assertion
that was introduced in r4036, to address Issue #161.
parent
14757946
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
6 deletions
+46
-6
buf/buf0buf.c
buf/buf0buf.c
+46
-6
No files found.
buf/buf0buf.c
View file @
c5fd0ac4
...
...
@@ -1863,12 +1863,52 @@ buf_block_align(
buf_block_init() so that block[n].frame ==
block->frame + n * UNIV_PAGE_SIZE. Check it. */
ut_ad
(
block
->
frame
==
page_align
(
ptr
));
/* The space id and page number should be
stamped on the page. */
ut_ad
(
block
->
page
.
space
==
page_get_space_id
(
page_align
(
ptr
)));
ut_ad
(
block
->
page
.
offset
==
page_get_page_no
(
page_align
(
ptr
)));
#ifdef UNIV_DEBUG
/* A thread that updates these fields must
hold buf_pool_mutex and block->mutex. Acquire
only the latter. */
mutex_enter
(
&
block
->
mutex
);
switch
(
buf_block_get_state
(
block
))
{
case
BUF_BLOCK_ZIP_FREE
:
case
BUF_BLOCK_ZIP_PAGE
:
case
BUF_BLOCK_ZIP_DIRTY
:
/* These types should only be used in
the compressed buffer pool, whose
memory is allocated from
buf_pool->chunks, in UNIV_PAGE_SIZE
blocks flagged as BUF_BLOCK_MEMORY. */
ut_error
;
break
;
case
BUF_BLOCK_NOT_USED
:
case
BUF_BLOCK_READY_FOR_USE
:
case
BUF_BLOCK_MEMORY
:
/* Some data structures contain
"guess" pointers to file pages. The
file pages may have been freed and
reused. Do not complain. */
break
;
case
BUF_BLOCK_REMOVE_HASH
:
/* buf_LRU_block_remove_hashed_page()
will overwrite the FIL_PAGE_OFFSET and
FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID with
0xff and set the state to
BUF_BLOCK_REMOVE_HASH. */
ut_ad
(
page_get_space_id
(
page_align
(
ptr
))
==
0xffffffff
);
ut_ad
(
page_get_page_no
(
page_align
(
ptr
))
==
0xffffffff
);
break
;
case
BUF_BLOCK_FILE_PAGE
:
ut_ad
(
block
->
page
.
space
==
page_get_space_id
(
page_align
(
ptr
)));
ut_ad
(
block
->
page
.
offset
==
page_get_page_no
(
page_align
(
ptr
)));
break
;
}
mutex_exit
(
&
block
->
mutex
);
#endif
/* UNIV_DEBUG */
return
(
block
);
}
...
...
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