Commit 30204e96 authored by marko's avatar marko

branches/zip: Add missing Doxygen comments for page0zip.

parent 413654b5
...@@ -444,9 +444,17 @@ page_zip_calc_checksum( ...@@ -444,9 +444,17 @@ page_zip_calc_checksum(
__attribute__((nonnull)); __attribute__((nonnull));
#ifndef UNIV_HOTBACKUP #ifndef UNIV_HOTBACKUP
/** Check if a pointer to an uncompressed page matches a compressed page.
@param ptr pointer to an uncompressed page frame
@param page_zip compressed page descriptor
@return TRUE if ptr and page_zip refer to the same block */
# define PAGE_ZIP_MATCH(ptr, page_zip) \ # define PAGE_ZIP_MATCH(ptr, page_zip) \
(buf_frame_get_page_zip(ptr) == (page_zip)) (buf_frame_get_page_zip(ptr) == (page_zip))
#else /* !UNIV_HOTBACKUP */ #else /* !UNIV_HOTBACKUP */
/** Check if a pointer to an uncompressed page matches a compressed page.
@param ptr pointer to an uncompressed page frame
@param page_zip compressed page descriptor
@return TRUE if ptr and page_zip refer to the same block */
# define PAGE_ZIP_MATCH(ptr, page_zip) \ # define PAGE_ZIP_MATCH(ptr, page_zip) \
(page_align(ptr) + UNIV_PAGE_SIZE == (page_zip)->data) (page_align(ptr) + UNIV_PAGE_SIZE == (page_zip)->data)
#endif /* !UNIV_HOTBACKUP */ #endif /* !UNIV_HOTBACKUP */
......
...@@ -98,15 +98,15 @@ In summary, the compressed page looks like this: ...@@ -98,15 +98,15 @@ In summary, the compressed page looks like this:
- deleted records (free list) in link order - deleted records (free list) in link order
*/ */
/* Start offset of the area that will be compressed */ /** Start offset of the area that will be compressed */
#define PAGE_ZIP_START PAGE_NEW_SUPREMUM_END #define PAGE_ZIP_START PAGE_NEW_SUPREMUM_END
/* Size of an compressed page directory entry */ /** Size of an compressed page directory entry */
#define PAGE_ZIP_DIR_SLOT_SIZE 2 #define PAGE_ZIP_DIR_SLOT_SIZE 2
/* Mask of record offsets */ /** Mask of record offsets */
#define PAGE_ZIP_DIR_SLOT_MASK 0x3fff #define PAGE_ZIP_DIR_SLOT_MASK 0x3fff
/* 'owned' flag */ /** 'owned' flag */
#define PAGE_ZIP_DIR_SLOT_OWNED 0x4000 #define PAGE_ZIP_DIR_SLOT_OWNED 0x4000
/* 'deleted' flag */ /** 'deleted' flag */
#define PAGE_ZIP_DIR_SLOT_DEL 0x8000 #define PAGE_ZIP_DIR_SLOT_DEL 0x8000
/**********************************************************************//** /**********************************************************************//**
......
...@@ -3021,9 +3021,12 @@ page_zip_hexdump_func( ...@@ -3021,9 +3021,12 @@ page_zip_hexdump_func(
} }
} }
/** Dump a block of memory on the standard error stream.
@param buf in: data
@param size in: length of the data, in bytes */
#define page_zip_hexdump(buf, size) page_zip_hexdump_func(#buf, buf, size) #define page_zip_hexdump(buf, size) page_zip_hexdump_func(#buf, buf, size)
/* Flag: make page_zip_validate() compare page headers only */ /** Flag: make page_zip_validate() compare page headers only */
UNIV_INTERN ibool page_zip_validate_header_only = FALSE; UNIV_INTERN ibool page_zip_validate_header_only = FALSE;
/**********************************************************************//** /**********************************************************************//**
...@@ -3864,7 +3867,7 @@ page_zip_write_trx_id_and_roll_ptr( ...@@ -3864,7 +3867,7 @@ page_zip_write_trx_id_and_roll_ptr(
} }
#ifdef UNIV_ZIP_DEBUG #ifdef UNIV_ZIP_DEBUG
/* Set this variable in a debugger to disable page_zip_clear_rec(). /** Set this variable in a debugger to disable page_zip_clear_rec().
The only observable effect should be the compression ratio due to The only observable effect should be the compression ratio due to
deleted records not being zeroed out. In rare cases, there can be deleted records not being zeroed out. In rare cases, there can be
page_zip_validate() failures on the node_ptr, trx_id and roll_ptr page_zip_validate() failures on the node_ptr, trx_id and roll_ptr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment