MySQL 8.0.39
Source Code Documentation
zipdecompress.ic File Reference

Compressed page interface. More...

#include "btr0types.h"
#include "fil0types.h"
#include "page0types.h"
#include "page/page.ic"

Macros

#define zip_decompress_ic
 NOTE: The functions in this file should only use functions from other files in library. More...
 
#define page_zip_dir_start_low(page_zip, n_dense)    ((page_zip)->data + page_zip_dir_start_offs(page_zip, n_dense))
 Gets a pointer to the compressed page trailer (the dense page directory), including deleted records (the free list). More...
 
#define page_zip_dir_start(page_zip)    page_zip_dir_start_low(page_zip, page_zip_dir_elems(page_zip))
 Gets a pointer to the compressed page trailer (the dense page directory), including deleted records (the free list). More...
 

Functions

static ulint page_zip_get_size (const page_zip_des_t *page_zip)
 Determine the size of a compressed page in bytes. More...
 
static bool page_zip_simple_validate (const page_zip_des_t *page_zip)
 Validate a compressed page descriptor. More...
 
static ulint page_zip_dir_elems (const page_zip_des_t *page_zip)
 Gets the number of elements in the dense page directory, including deleted records (the free list). More...
 
static ulint page_zip_dir_size (const page_zip_des_t *page_zip)
 Gets the size of the compressed page trailer (the dense page directory), including deleted records (the free list). More...
 
static ulint page_zip_dir_get (const page_zip_des_t *page_zip, ulint slot)
 Read a given slot in the dense page directory. More...
 

Variables

constexpr uint32_t PAGE_ZIP_DIR_SLOT_SIZE = 2
 Size of an compressed page directory entry. More...
 

Detailed Description

Compressed page interface.

Created June 2005 by Marko Makela

Macro Definition Documentation

◆ page_zip_dir_start

#define page_zip_dir_start (   page_zip)     page_zip_dir_start_low(page_zip, page_zip_dir_elems(page_zip))

Gets a pointer to the compressed page trailer (the dense page directory), including deleted records (the free list).

Parameters
[in]page_zipcompressed page
Returns
pointer to the dense page directory

◆ page_zip_dir_start_low

#define page_zip_dir_start_low (   page_zip,
  n_dense 
)     ((page_zip)->data + page_zip_dir_start_offs(page_zip, n_dense))

Gets a pointer to the compressed page trailer (the dense page directory), including deleted records (the free list).

Parameters
[in]page_zipcompressed page
[in]n_densenumber of entries in the directory
Returns
pointer to the dense page directory

◆ zip_decompress_ic

#define zip_decompress_ic

NOTE: The functions in this file should only use functions from other files in library.

The code in this file is used to make a library for external tools.

Function Documentation

◆ page_zip_dir_elems()

static ulint page_zip_dir_elems ( const page_zip_des_t page_zip)
inlinestatic

Gets the number of elements in the dense page directory, including deleted records (the free list).

Returns
number of elements in the dense page directory
Parameters
page_zipin: compressed page

◆ page_zip_dir_get()

static ulint page_zip_dir_get ( const page_zip_des_t page_zip,
ulint  slot 
)
inlinestatic

Read a given slot in the dense page directory.

Returns
record offset on the uncompressed page, possibly ORed with PAGE_ZIP_DIR_SLOT_DEL or PAGE_ZIP_DIR_SLOT_OWNED
Parameters
page_zipin: compressed page
slotin: slot (0=first user record)

◆ page_zip_dir_size()

static ulint page_zip_dir_size ( const page_zip_des_t page_zip)
inlinestatic

Gets the size of the compressed page trailer (the dense page directory), including deleted records (the free list).

Returns
length of dense page directory, in bytes
Parameters
page_zipin: compressed page

◆ page_zip_get_size()

static ulint page_zip_get_size ( const page_zip_des_t page_zip)
inlinestatic

Determine the size of a compressed page in bytes.

Returns
size in bytes
Parameters
page_zipin: compressed page

◆ page_zip_simple_validate()

static bool page_zip_simple_validate ( const page_zip_des_t page_zip)
inlinestatic

Validate a compressed page descriptor.

Returns
true if ok
Parameters
page_zipin: compressed page descriptor

Variable Documentation

◆ PAGE_ZIP_DIR_SLOT_SIZE

constexpr uint32_t PAGE_ZIP_DIR_SLOT_SIZE = 2
constexpr

Size of an compressed page directory entry.