mariadb/include/fsp0fsp.ic
2006-08-29 09:30:31 +00:00

28 lines
761 B
Text

/******************************************************
File space management
(c) 1995 Innobase Oy
Created 12/18/1995 Heikki Tuuri
*******************************************************/
/***************************************************************************
Checks if a page address is an extent descriptor page address. */
UNIV_INLINE
ibool
fsp_descr_page(
/*===========*/
/* out: TRUE if a descriptor page */
ulint zip_size,/* in: compressed page size in bytes;
0 for uncompressed pages */
ulint page_no)/* in: page number */
{
ut_ad(ut_is_2pow(zip_size));
if (!zip_size) {
return(UNIV_UNLIKELY((page_no & (UNIV_PAGE_SIZE - 1))
== FSP_XDES_OFFSET));
}
return(UNIV_UNLIKELY((page_no & (zip_size - 1)) == FSP_XDES_OFFSET));
}