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
fa846a7b
Commit
fa846a7b
authored
Jun 14, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: page_zip_validate(): First compare the page headers
and obey the added flag page_zip_validate_header_only.
parent
fa63e363
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
page/page0zip.c
page/page0zip.c
+19
-1
No files found.
page/page0zip.c
View file @
fa846a7b
...
...
@@ -1966,6 +1966,9 @@ page_zip_decompress(
}
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
/* Flag: make page_zip_validate() compare page headers only */
ibool
page_zip_validate_header_only
=
FALSE
;
/**************************************************************************
Check that the compressed and decompressed pages match. */
...
...
@@ -1977,13 +1980,28 @@ page_zip_validate(
const
page_t
*
page
)
/* in: uncompressed page */
{
page_zip_des_t
temp_page_zip
=
*
page_zip
;
page_t
*
temp_page
=
buf_frame_alloc
()
;
page_t
*
temp_page
;
ibool
valid
;
ut_a
(
buf_block_get_page_zip
(
buf_block_align
((
byte
*
)
page
))
==
page_zip
);
ut_a
(
page_is_comp
((
page_t
*
)
page
));
if
(
memcmp
(
page_zip
->
data
+
FIL_PAGE_PREV
,
page
+
FIL_PAGE_PREV
,
FIL_PAGE_LSN
-
FIL_PAGE_PREV
)
||
memcmp
(
page_zip
->
data
+
FIL_PAGE_TYPE
,
page
+
FIL_PAGE_TYPE
,
2
)
||
memcmp
(
page_zip
->
data
+
FIL_PAGE_DATA
,
page
+
FIL_PAGE_DATA
,
PAGE_DATA
-
FIL_PAGE_DATA
))
{
fputs
(
"page_zip_validate(): page header mismatch
\n
"
,
stderr
);
return
(
FALSE
);
}
if
(
page_zip_validate_header_only
)
{
return
(
TRUE
);
}
temp_page
=
buf_frame_alloc
();
valid
=
page_zip_decompress
(
&
temp_page_zip
,
temp_page
);
if
(
!
valid
)
{
fputs
(
"page_zip_validate(): failed to decompress
\n
"
,
stderr
);
...
...
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