InnoDB Plugin
1.0
|
Macros | |
#define | PAGE_ZIP_START PAGE_NEW_SUPREMUM_END |
#define | PAGE_ZIP_DIR_SLOT_SIZE 2 |
#define | PAGE_ZIP_DIR_SLOT_MASK 0x3fff |
#define | PAGE_ZIP_DIR_SLOT_OWNED 0x4000 |
#define | PAGE_ZIP_DIR_SLOT_DEL 0x8000 |
Functions | |
UNIV_INLINE ulint | page_zip_get_size (const page_zip_des_t *page_zip) |
UNIV_INLINE void | page_zip_set_size (page_zip_des_t *page_zip, ulint size) |
UNIV_INLINE ibool | page_zip_rec_needs_ext (ulint rec_size, ulint comp, ulint n_fields, ulint zip_size) |
UNIV_INLINE ibool | page_zip_simple_validate (const page_zip_des_t *page_zip) |
UNIV_INLINE ibool | page_zip_get_trailer_len (const page_zip_des_t *page_zip, ibool is_clust) |
UNIV_INLINE lint | page_zip_max_ins_size (const page_zip_des_t *page_zip, ibool is_clust) |
UNIV_INLINE ibool | page_zip_available (const page_zip_des_t *page_zip, ibool is_clust, ulint length, ulint create) |
UNIV_INLINE void | page_zip_des_init (page_zip_des_t *page_zip) |
UNIV_INTERN void | page_zip_write_header_log (const byte *data, ulint length, mtr_t *mtr) |
UNIV_INLINE void | page_zip_write_header (page_zip_des_t *page_zip, const byte *str, ulint length, mtr_t *mtr) |
UNIV_INLINE void | page_zip_compress_write_log_no_data (ulint level, const page_t *page, dict_index_t *index, mtr_t *mtr) |
UNIV_INLINE byte * | page_zip_parse_compress_no_data (byte *ptr, byte *end_ptr, page_t *page, page_zip_des_t *page_zip, dict_index_t *index) |
UNIV_INLINE void | page_zip_reset_stat_per_index () |
Compressed page interface
Created June 2005 by Marko Makela
#define PAGE_ZIP_DIR_SLOT_DEL 0x8000 |
'deleted' flag
#define PAGE_ZIP_DIR_SLOT_MASK 0x3fff |
Mask of record offsets
#define PAGE_ZIP_DIR_SLOT_OWNED 0x4000 |
'owned' flag
#define PAGE_ZIP_DIR_SLOT_SIZE 2 |
Size of an compressed page directory entry
#define PAGE_ZIP_START PAGE_NEW_SUPREMUM_END |
Start offset of the area that will be compressed
UNIV_INLINE ibool page_zip_available | ( | const page_zip_des_t * | page_zip, |
ibool | is_clust, | ||
ulint | length, | ||
ulint | create | ||
) |
Determine if enough space is available in the modification log.
page_zip | in: compressed page |
is_clust | in: TRUE if clustered index |
length | in: combined size of the record |
create | in: nonzero=add the record to the heap |
UNIV_INLINE void page_zip_compress_write_log_no_data | ( | ulint | level, |
const page_t * | page, | ||
dict_index_t * | index, | ||
mtr_t * | mtr | ||
) |
Write a log record of compressing an index page without the data on the page.
level | in: compression level |
page | in: page that is compressed |
index | in: index |
mtr | in: mtr |
UNIV_INLINE void page_zip_des_init | ( | page_zip_des_t * | page_zip | ) |
Initialize a compressed page descriptor.
page_zip | in/out: compressed page descriptor |
UNIV_INLINE ulint page_zip_get_size | ( | const page_zip_des_t * | page_zip | ) |
Determine the size of a compressed page in bytes.
page_zip | in: compressed page |
UNIV_INLINE ibool page_zip_get_trailer_len | ( | const page_zip_des_t * | page_zip, |
ibool | is_clust | ||
) |
Determine if the length of the page trailer.
page_zip | in: compressed page |
is_clust | in: TRUE if clustered index |
UNIV_INLINE lint page_zip_max_ins_size | ( | const page_zip_des_t * | page_zip, |
ibool | is_clust | ||
) |
Determine how big record can be inserted without recompressing the page.
page_zip | in: compressed page |
is_clust | in: TRUE if clustered index |
UNIV_INLINE byte* page_zip_parse_compress_no_data | ( | byte * | ptr, |
byte * | end_ptr, | ||
page_t * | page, | ||
page_zip_des_t * | page_zip, | ||
dict_index_t * | index | ||
) |
Parses a log record of compressing an index page without the data.
ptr | in: buffer |
end_ptr | in: buffer end |
page | in: uncompressed page |
page_zip | out: compressed page |
index | in: index |
UNIV_INLINE ibool page_zip_rec_needs_ext | ( | ulint | rec_size, |
ulint | comp, | ||
ulint | n_fields, | ||
ulint | zip_size | ||
) |
Determine if a record is so big that it needs to be stored externally.
rec_size | in: length of the record in bytes |
comp | in: nonzero=compact format |
n_fields | in: number of fields in the record; ignored if zip_size == 0 |
zip_size | in: compressed page size in bytes, or 0 |
UNIV_INLINE void page_zip_reset_stat_per_index | ( | ) |
Reset the counters used for filling INFORMATION_SCHEMA.innodb_cmp_per_index.
UNIV_INLINE void page_zip_set_size | ( | page_zip_des_t * | page_zip, |
ulint | size | ||
) |
Set the size of a compressed page in bytes.
page_zip | in/out: compressed page |
size | in: size in bytes |
UNIV_INLINE ibool page_zip_simple_validate | ( | const page_zip_des_t * | page_zip | ) |
Validate a compressed page descriptor.
page_zip | in: compressed page descriptor |
UNIV_INLINE void page_zip_write_header | ( | page_zip_des_t * | page_zip, |
const byte * | str, | ||
ulint | length, | ||
mtr_t * | mtr | ||
) |
Write data to the uncompressed header portion of a page. The data must already have been written to the uncompressed page. However, the data portion of the uncompressed page may differ from the compressed page when a record is being inserted in page_cur_insert_rec_zip().
page_zip | in/out: compressed page |
str | in: address on the uncompressed page |
length | in: length of the data |
mtr | in: mini-transaction, or NULL |
UNIV_INTERN void page_zip_write_header_log | ( | const byte * | data, |
ulint | length, | ||
mtr_t * | mtr | ||
) |
Write a log record of writing to the uncompressed header portion of a page. in: mini-transaction
data | in: data on the uncompressed page |
length | in: length of the data |