41 #ifdef UNIV_MATERIALIZE
51 typedef byte page_header_t;
53 #define PAGE_HEADER FSEG_PAGE_DATA
56 #define PAGE_N_DIR_SLOTS 0
57 #define PAGE_HEAP_TOP 2
61 #define PAGE_GARBAGE 8
62 #define PAGE_LAST_INSERT 10
65 #define PAGE_DIRECTION 12
66 #define PAGE_N_DIRECTION 14
68 #define PAGE_N_RECS 16
69 #define PAGE_MAX_TRX_ID 18
76 #define PAGE_HEADER_PRIV_END 26
82 #define PAGE_INDEX_ID 28
85 #define PAGE_BTR_SEG_LEAF 36
88 #define PAGE_BTR_IBUF_FREE_LIST PAGE_BTR_SEG_LEAF
89 #define PAGE_BTR_IBUF_FREE_LIST_NODE PAGE_BTR_SEG_LEAF
95 #define PAGE_BTR_SEG_TOP (36 + FSEG_HEADER_SIZE)
101 #define PAGE_DATA (PAGE_HEADER + 36 + 2 * FSEG_HEADER_SIZE)
104 #define PAGE_OLD_INFIMUM (PAGE_DATA + 1 + REC_N_OLD_EXTRA_BYTES)
107 #define PAGE_OLD_SUPREMUM (PAGE_DATA + 2 + 2 * REC_N_OLD_EXTRA_BYTES + 8)
110 #define PAGE_OLD_SUPREMUM_END (PAGE_OLD_SUPREMUM + 9)
113 #define PAGE_NEW_INFIMUM (PAGE_DATA + REC_N_NEW_EXTRA_BYTES)
116 #define PAGE_NEW_SUPREMUM (PAGE_DATA + 2 * REC_N_NEW_EXTRA_BYTES + 8)
119 #define PAGE_NEW_SUPREMUM_END (PAGE_NEW_SUPREMUM + 8)
125 #define PAGE_HEAP_NO_INFIMUM 0
126 #define PAGE_HEAP_NO_SUPREMUM 1
127 #define PAGE_HEAP_NO_USER_LOW 2
135 #define PAGE_SAME_REC 3
136 #define PAGE_SAME_PAGE 4
137 #define PAGE_NO_DIRECTION 5
143 typedef byte page_dir_slot_t;
144 typedef page_dir_slot_t page_dir_t;
149 #define PAGE_DIR FIL_PAGE_DATA_END
152 #define PAGE_DIR_SLOT_SIZE 2
156 #define PAGE_EMPTY_DIR_START (PAGE_DIR + 2 * PAGE_DIR_SLOT_SIZE)
161 #define PAGE_DIR_SLOT_MAX_N_OWNED 8
162 #define PAGE_DIR_SLOT_MIN_N_OWNED 4
172 __attribute__((
const));
181 __attribute__((
const));
239 __attribute__((nonnull, pure));
243 #define page_header_get_ptr(page, field) \
244 (page_header_get_offs(page, field) \
245 ? page + page_header_get_offs(page, field) : NULL)
257 #ifndef UNIV_HOTBACKUP
286 #define page_get_infimum_rec(page) ((page) + page_get_infimum_offset(page))
287 #define page_get_supremum_rec(page) ((page) + page_get_supremum_offset(page))
297 #ifndef UNIV_HOTBACKUP
315 const ulint* offsets,
316 ulint* matched_fields,
319 ulint* matched_bytes);
403 page_dir_get_nth_slot(
408 # define page_dir_get_nth_slot(page, n) \
409 ((page) + UNIV_PAGE_SIZE - PAGE_DIR \
410 - (n + 1) * PAGE_DIR_SLOT_SIZE)
427 const page_dir_slot_t* slot);
434 page_dir_slot_t* slot,
443 const page_dir_slot_t* slot);
450 page_dir_slot_t*slot,
504 __attribute__((nonnull, pure));
566 __attribute__((
const));
575 __attribute__((
const));
584 __attribute__((
const));
594 __attribute__((
const));
603 __attribute__((
const));
613 __attribute__((
const));
662 __attribute__((
const));
720 const ulint* offsets);
772 __attribute__((nonnull));
788 __attribute__((nonnull));
805 __attribute__((nonnull));
817 __attribute__((nonnull));
832 __attribute__((nonnull(1, 2, 4, 5)));
846 __attribute__((nonnull(1, 2, 4, 5)));
857 __attribute__((nonnull(1)));
870 __attribute__((nonnull(1)));
907 const ulint* offsets);
957 const ulint* offsets);
1007 #ifdef UNIV_MATERIALIZE
1009 #define UNIV_INLINE UNIV_INLINE_ORIGINAL
1013 #include "page0page.ic"
UNIV_INTERN void page_set_max_trx_id(buf_block_t *block, page_zip_des_t *page_zip, trx_id_t trx_id, mtr_t *mtr)
UNIV_INLINE ulint page_is_comp(const page_t *page)
UNIV_INLINE ulint page_get_infimum_offset(const page_t *page)
UNIV_INTERN ibool page_simple_validate_old(const page_t *page)
UNIV_INLINE ulint page_get_space_id(const page_t *page)
UNIV_INLINE ulint page_rec_get_base_extra_size(const rec_t *rec)
UNIV_INLINE page_t * page_align(const void *ptr) __attribute__((const ))
UNIV_INLINE void page_rec_set_next(rec_t *rec, rec_t *next)
UNIV_INLINE ulint page_get_page_no(const page_t *page)
UNIV_INTERN void page_dir_balance_slot(page_t *page, page_zip_des_t *page_zip, ulint slot_no) __attribute__((nonnull(1)))
UNIV_INLINE void page_header_set_field(page_t *page, page_zip_des_t *page_zip, ulint field, ulint val)
UNIV_INLINE ulint page_get_n_recs(const page_t *page)
UNIV_INTERN rec_t * page_copy_rec_list_start(buf_block_t *new_block, buf_block_t *block, rec_t *rec, dict_index_t *index, mtr_t *mtr) __attribute__((nonnull))
UNIV_INLINE void page_dir_set_n_heap(page_t *page, page_zip_des_t *page_zip, ulint n_heap)
UNIV_INLINE ulint page_get_data_size(const page_t *page)
UNIV_INTERN void page_delete_rec_list_end(rec_t *rec, buf_block_t *block, dict_index_t *index, ulint n_recs, ulint size, mtr_t *mtr) __attribute__((nonnull))
UNIV_INLINE trx_id_t page_get_max_trx_id(const page_t *page)
UNIV_INLINE const rec_t * page_rec_get_next_low(const rec_t *rec, ulint comp)
UNIV_INTERN ibool page_simple_validate_new(const page_t *page)
UNIV_INTERN byte * page_mem_alloc_heap(page_t *page, page_zip_des_t *page_zip, ulint need, ulint *heap_no)
UNIV_INLINE ulint page_dir_get_n_heap(const page_t *page)
UNIV_INLINE int page_cmp_dtuple_rec_with_match(const dtuple_t *dtuple, const rec_t *rec, const ulint *offsets, ulint *matched_fields, ulint *matched_bytes)
UNIV_INLINE const rec_t * page_dir_slot_get_rec(const page_dir_slot_t *slot)
UNIV_INLINE rec_t * page_rec_get_next(rec_t *rec)
UNIV_INTERN void page_rec_print(const rec_t *rec, const ulint *offsets)
UNIV_INLINE ulint page_dir_calc_reserved_space(ulint n_recs)
UNIV_INTERN void page_dir_print(page_t *page, ulint pr_n)
UNIV_INTERN ibool page_rec_validate(const rec_t *rec, const ulint *offsets)
UNIV_INLINE void page_header_reset_last_insert(page_t *page, page_zip_des_t *page_zip, mtr_t *mtr)
UNIV_INLINE ulint page_header_get_offs(const page_t *page, ulint field) __attribute__((nonnull
UNIV_INLINE ulint page_header_get_field(const page_t *page, ulint field)
UNIV_INLINE void page_dir_set_n_slots(page_t *page, page_zip_des_t *page_zip, ulint n_slots)
UNIV_INLINE void page_dir_slot_set_rec(page_dir_slot_t *slot, rec_t *rec)
UNIV_INLINE rec_t * page_rec_get_prev(rec_t *rec)
UNIV_INTERN void page_print(buf_block_t *block, dict_index_t *index, ulint dn, ulint rn)
UNIV_INTERN ulint page_dir_find_owner_slot(const rec_t *rec)
UNIV_INTERN byte * page_parse_delete_rec_list(byte type, byte *ptr, byte *end_ptr, buf_block_t *block, dict_index_t *index, mtr_t *mtr)
UNIV_INTERN ibool page_move_rec_list_end(buf_block_t *new_block, buf_block_t *block, rec_t *split_rec, dict_index_t *index, mtr_t *mtr) __attribute__((nonnull(1
UNIV_INLINE void page_update_max_trx_id(buf_block_t *block, page_zip_des_t *page_zip, trx_id_t trx_id, mtr_t *mtr)
UNIV_INLINE const rec_t * page_rec_get_prev_const(const rec_t *rec)
UNIV_INTERN page_t * page_create_zip(buf_block_t *block, dict_index_t *index, ulint level, mtr_t *mtr)
UNIV_INLINE ulint page_rec_is_comp(const rec_t *rec)
UNIV_INTERN rec_t * page_get_middle_rec(page_t *page)
UNIV_INLINE ulint page_get_max_insert_size(const page_t *page, ulint n_recs)
UNIV_INLINE ibool page_is_leaf(const page_t *page) __attribute__((nonnull
UNIV_INLINE ulint page_get_max_insert_size_after_reorganize(const page_t *page, ulint n_recs)
UNIV_INTERN void page_header_print(const page_t *page)
UNIV_INTERN rec_t * page_copy_rec_list_end(buf_block_t *new_block, buf_block_t *block, rec_t *rec, dict_index_t *index, mtr_t *mtr) __attribute__((nonnull))
UNIV_INTERN void page_delete_rec_list_start(rec_t *rec, buf_block_t *block, dict_index_t *index, mtr_t *mtr) __attribute__((nonnull))
UNIV_INTERN ibool page_validate(const page_t *page, dict_index_t *index)
UNIV_INLINE ulint page_offset(const void *ptr) __attribute__((const ))
UNIV_INLINE ulint page_get_supremum_offset(const page_t *page)
UNIV_INLINE void page_header_set_ptr(page_t *page, page_zip_des_t *page_zip, ulint field, const byte *ptr)
UNIV_INTERN void page_check_dir(const page_t *page)
UNIV_INLINE ibool page_rec_is_supremum(const rec_t *rec) __attribute__((const ))
UNIV_INLINE void page_dir_slot_set_n_owned(page_dir_slot_t *slot, page_zip_des_t *page_zip, ulint n)
UNIV_INLINE void page_mem_alloc_free(page_t *page, page_zip_des_t *page_zip, rec_t *next_rec, ulint need)
UNIV_INTERN page_t * page_create(buf_block_t *block, mtr_t *mtr, ulint comp)
UNIV_INTERN void page_print_list(buf_block_t *block, dict_index_t *index, ulint pr_n)
UNIV_INTERN byte * page_parse_create(byte *ptr, byte *end_ptr, ulint comp, buf_block_t *block, mtr_t *mtr)
UNIV_INLINE ibool page_rec_is_user_rec_low(ulint offset) __attribute__((const ))
UNIV_INLINE const rec_t * page_rec_get_next_const(const rec_t *rec)
UNIV_INLINE void page_mem_free(page_t *page, page_zip_des_t *page_zip, rec_t *rec, dict_index_t *index, const ulint *offsets)
UNIV_INLINE ibool page_rec_is_user_rec(const rec_t *rec) __attribute__((const ))
UNIV_INTERN void page_copy_rec_list_end_no_locks(buf_block_t *new_block, buf_block_t *block, rec_t *rec, dict_index_t *index, mtr_t *mtr)
UNIV_INLINE ibool page_rec_check(const rec_t *rec)
const rec_t * page_find_rec_with_heap_no(const page_t *page, ulint heap_no)
UNIV_INLINE ulint page_dir_slot_get_n_owned(const page_dir_slot_t *slot)
UNIV_INLINE rec_t * page_rec_find_owner_rec(rec_t *rec)
UNIV_INLINE ibool page_rec_is_supremum_low(ulint offset) __attribute__((const ))
UNIV_INLINE ibool page_rec_is_infimum(const rec_t *rec) __attribute__((const ))
UNIV_INLINE ulint page_get_free_space_of_empty(ulint comp) __attribute__((const ))
UNIV_INTERN ibool UNIV_INTERN ibool UNIV_INTERN void page_dir_split_slot(page_t *page, page_zip_des_t *page_zip, ulint slot_no) __attribute__((nonnull(1)))
UNIV_INTERN ibool UNIV_INTERN ibool page_move_rec_list_start(buf_block_t *new_block, buf_block_t *block, rec_t *split_rec, dict_index_t *index, mtr_t *mtr) __attribute__((nonnull(1
UNIV_INTERN ulint page_rec_get_n_recs_before(const rec_t *rec)
UNIV_INLINE ulint page_dir_get_n_slots(const page_t *page)
UNIV_INLINE ulint page_rec_get_heap_no(const rec_t *rec)
UNIV_INTERN void page_rec_write_index_page_no(rec_t *rec, ulint i, ulint page_no, mtr_t *mtr)
UNIV_INLINE ibool page_rec_is_infimum_low(ulint offset) __attribute__((const ))