/********************************************************************//** Gets list first node address. @return file address */ UNIV_INLINE fil_addr_t flst_get_first( /*===========*/ const flst_base_node_t* base, /*!< in: pointer to base node */ mtr_t* mtr) /*!< in: mini-transaction handle */ { return(flst_read_addr(base + FLST_FIRST, mtr)); } #define FLST_FIRST 4 /********************************************************************//** Reads a file address. @return file address */ UNIV_INLINE fil_addr_t flst_read_addr( /*===========*/ const fil_faddr_t* faddr, /*!< in: pointer to file faddress */ mtr_t* mtr) /*!< in: mini-transaction handle */ { fil_addr_t addr; ut_ad(faddr && mtr); addr.page = mtr_read_ulint(faddr + FIL_ADDR_PAGE, MLOG_4BYTES, mtr); addr.boffset = mtr_read_ulint(faddr + FIL_ADDR_BYTE, MLOG_2BYTES, mtr); ut_a(addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA); ut_a(ut_align_offset(faddr, UNIV_PAGE_SIZE) >= FIL_PAGE_DATA); return(addr); }
#define FIL_ADDR_PAGE 0 #define FIL_ADDR_BYTE 4#define FIL_PAGE_DATA 38
时间: 2024-11-09 00:29:39