InnoDB Plugin  1.0
Functions
fsp0fsp.ic File Reference
This graph shows which files directly or indirectly include this file:

Functions

UNIV_INLINE ibool fsp_descr_page (ulint zip_size, ulint page_no)
UNIV_INLINE bool fsp_flags_is_valid (ulint flags)
UNIV_INLINE ibool fsp_flags_is_compressed (ulint flags)
UNIV_INLINE ulint fsp_flags_get_zip_size (ulint flags)
UNIV_INLINE ulint fsp_flags_get_page_size (ulint flags)
UNIV_INLINE ulint fsp_flags_set_page_size (ulint flags, ulint page_size)
UNIV_INLINE ulint xdes_calc_descriptor_index (ulint zip_size, ulint offset)
UNIV_INLINE ibool xdes_get_bit (const xdes_t *descr, ulint bit, ulint offset)
UNIV_INLINE ulint xdes_calc_descriptor_page (ulint zip_size, ulint offset)

Detailed Description

File space management

Created 12/18/1995 Heikki Tuuri

Function Documentation

UNIV_INLINE ibool fsp_descr_page ( ulint  zip_size,
ulint  page_no 
)

Checks if a page address is an extent descriptor page address.

Returns
TRUE if a descriptor page
Parameters
zip_sizein: compressed page size in bytes; 0 for uncompressed pages
page_noin: page number
UNIV_INLINE ulint fsp_flags_get_page_size ( ulint  flags)

Extract the page size from tablespace flags.

Returns
page size of the tablespace in bytes
Parameters
flagsin: tablespace flags
UNIV_INLINE ulint fsp_flags_get_zip_size ( ulint  flags)

Extract the zip size from tablespace flags.

Returns
compressed page size of the file-per-table tablespace in bytes, or zero if the table is not compressed.
Parameters
flagsin: tablespace flags
UNIV_INLINE ibool fsp_flags_is_compressed ( ulint  flags)

Determine if the tablespace is compressed from dict_table_t::flags.

Returns
TRUE if compressed, FALSE if not compressed
Parameters
flagsin: tablespace flags
UNIV_INLINE bool fsp_flags_is_valid ( ulint  flags)

Validate and return the tablespace flags, which are stored in the tablespace header at offset FSP_SPACE_FLAGS. They should be 0 for ROW_FORMAT=COMPACT and ROW_FORMAT=REDUNDANT. The newer row formats, COMPRESSED and DYNAMIC, use a file format > Antelope so they should have a file format number plus the DICT_TF_COMPACT bit set.

Returns
true if check ok
Parameters
flagsin: tablespace flags
UNIV_INLINE ulint fsp_flags_set_page_size ( ulint  flags,
ulint  page_size 
)

Add the page size to the tablespace flags.

Returns
tablespace flags after page size is added
Parameters
flagsin: tablespace flags
page_sizein: page size in bytes
UNIV_INLINE ulint xdes_calc_descriptor_index ( ulint  zip_size,
ulint  offset 
)

Calculates the descriptor index within a descriptor page.

Returns
descriptor index
Parameters
zip_sizein: compressed page size in bytes; 0 for uncompressed pages
offsetin: page offset
UNIV_INLINE ulint xdes_calc_descriptor_page ( ulint  zip_size,
ulint  offset 
)

Calculates the page where the descriptor of a page resides.

Returns
descriptor page offset
Parameters
zip_sizein: compressed page size in bytes; 0 for uncompressed pages
offsetin: page offset
UNIV_INLINE ibool xdes_get_bit ( const xdes_t *  descr,
ulint  bit,
ulint  offset 
)

Gets a descriptor bit of a page.

Returns
TRUE if free
Parameters
descrin: descriptor
bitin: XDES_FREE_BIT or XDES_CLEAN_BIT
offsetin: page offset within extent: 0 ... FSP_EXTENT_SIZE - 1