mariadb/include/fsp0fsp.ic

29 lines
761 B
Text
Raw Normal View History

2005-10-27 09:29:40 +02:00
/******************************************************
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 */
2005-10-27 09:29:40 +02:00
ulint page_no)/* in: page number */
{
ut_ad(ut_is_2pow(zip_size));
2005-10-27 09:29:40 +02:00
if (!zip_size) {
return(UNIV_UNLIKELY((page_no & (UNIV_PAGE_SIZE - 1))
== FSP_XDES_OFFSET));
2005-10-27 09:29:40 +02:00
}
return(UNIV_UNLIKELY((page_no & (zip_size - 1)) == FSP_XDES_OFFSET));
2005-10-27 09:29:40 +02:00
}