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
8099eba8
Commit
8099eba8
authored
May 09, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Add detailed debugging output to page_zip_compress().
parent
32e6f3f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
page/page0zip.c
page/page0zip.c
+38
-0
No files found.
page/page0zip.c
View file @
8099eba8
...
...
@@ -510,6 +510,36 @@ page_zip_free(
return
(
ut_free
(
address
));
}
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
/* Set this variable in a debugger to enable
excessive logging in page_zip_compress(). */
ibool
page_zip_compress_dbg
;
/**************************************************************************
Wrapper for deflate(). Log the operation if page_zip_compress_dbg is set. */
static
ibool
page_zip_compress_deflate
(
/*======================*/
z_streamp
strm
,
/* in/out: compressed stream for deflate() */
int
flush
)
/* in: deflate() flushing method */
{
int
status
;
if
(
UNIV_UNLIKELY
(
page_zip_compress_dbg
))
{
ut_print_buf
(
stderr
,
strm
->
next_in
,
strm
->
avail_in
);
}
status
=
deflate
(
strm
,
flush
);
if
(
UNIV_UNLIKELY
(
page_zip_compress_dbg
))
{
fprintf
(
stderr
,
" -> %d
\n
"
,
status
);
}
return
(
status
);
}
/* Redefine deflate(). */
# undef deflate
# define deflate page_zip_compress_deflate
#endif
/* UNIV_DEBUG || UNIV_ZIP_DEBUG */
/**************************************************************************
Compress a page. */
...
...
@@ -566,6 +596,14 @@ page_zip_compress(
/* The dense directory excludes the infimum and supremum records. */
n_dense
=
page_dir_get_n_heap
((
page_t
*
)
page
)
-
2
;
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
if
(
UNIV_UNLIKELY
(
page_zip_compress_dbg
))
{
fprintf
(
stderr
,
"compress %p %p %lu %lu %lu
\n
"
,
(
void
*
)
page_zip
,
(
void
*
)
page
,
page_is_leaf
(
page
),
n_fields
,
n_dense
);
}
#endif
/* UNIV_DEBUG || UNIV_ZIP_DEBUG */
if
(
UNIV_UNLIKELY
(
n_dense
*
PAGE_ZIP_DIR_SLOT_SIZE
>=
page_zip
->
size
))
{
return
(
FALSE
);
...
...
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