38 #ifndef UNIV_HOTBACKUP
41 #define BTR_PAGE_MAX_REC_SIZE (UNIV_PAGE_SIZE / 2 - 200)
52 #define BTR_MAX_LEVELS 100
77 #define BTR_INSERT 512
81 #define BTR_ESTIMATE 1024
86 #define BTR_IGNORE_SEC_UNIQUE 2048
90 #define BTR_DELETE_MARK 4096
94 #define BTR_DELETE 8192
96 #ifdef UNIV_BLOB_DEBUG
99 struct btr_blob_dbg_struct
101 unsigned blob_page_no:32;
102 unsigned ref_page_no:32;
103 unsigned ref_heap_no:16;
104 unsigned ref_field_no:10;
106 unsigned always_owner:1;
118 btr_blob_dbg_add_blob(
125 __attribute__((nonnull));
135 __attribute__((nonnull));
142 btr_blob_dbg_is_empty(
146 __attribute__((nonnull, warn_unused_result));
152 btr_blob_dbg_set_deleted_flag(
156 const ulint* offsets,
158 __attribute__((nonnull));
167 const ulint* offsets,
170 __attribute__((nonnull));
172 # define btr_blob_dbg_assert_empty(index, page_no) \
173 ut_a(btr_blob_dbg_is_empty(index, page_no))
175 # define btr_blob_dbg_add_blob(rec, field_no, page, index, ctx) ((void) 0)
176 # define btr_blob_dbg_set_deleted_flag(rec, index, offsets, del)((void) 0)
177 # define btr_blob_dbg_owner(rec, index, offsets, i, val) ((void) 0)
178 # define btr_blob_dbg_assert_empty(index, page_no) ((void) 0)
204 __attribute__((nonnull));
212 # define btr_block_get(space,zip_size,page_no,mode,mtr) \
213 btr_block_get_func(space,zip_size,page_no,mode,__FILE__,__LINE__,mtr)
221 # define btr_page_get(space,zip_size,page_no,mode,mtr) \
222 buf_block_get_frame(btr_block_get(space,zip_size,page_no,mode,mtr))
232 #ifndef UNIV_HOTBACKUP
312 const ulint* offsets);
438 # define btr_insert_on_non_leaf_level(i,l,t,m) \
439 btr_insert_on_non_leaf_level_func(i,l,t,__FILE__,__LINE__,m)
449 #ifndef UNIV_HOTBACKUP
527 #ifndef UNIV_HOTBACKUP
574 #ifdef UNIV_BTR_PRINT
602 ibool dump_on_error);
615 #define BTR_N_LEAF_PAGES 1
616 #define BTR_TOTAL_SIZE 2
620 #include "btr0btr.ic"
UNIV_INTERN void btr_node_ptr_delete(dict_index_t *index, buf_block_t *block, mtr_t *mtr)
UNIV_INLINE void btr_leaf_page_release(buf_block_t *block, ulint latch_mode, mtr_t *mtr)
UNIV_INTERN ibool btr_page_get_split_rec_to_left(btr_cur_t *cursor, rec_t **split_rec)
UNIV_INTERN void btr_insert_on_non_leaf_level_func(dict_index_t *index, ulint level, dtuple_t *tuple, const char *file, ulint line, mtr_t *mtr)
UNIV_INTERN page_t * btr_root_get(dict_index_t *index, mtr_t *mtr)
UNIV_INTERN ibool btr_validate_index(dict_index_t *index, trx_t *trx)
UNIV_INTERN rec_t * btr_root_raise_and_insert(btr_cur_t *cursor, const dtuple_t *tuple, ulint n_ext, mtr_t *mtr)
UNIV_INTERN rec_t * btr_get_prev_user_rec(rec_t *rec, mtr_t *mtr)
UNIV_INTERN rec_t * btr_page_split_and_insert(btr_cur_t *cursor, const dtuple_t *tuple, ulint n_ext, mtr_t *mtr)
UNIV_INTERN ibool btr_index_rec_validate(const rec_t *rec, const dict_index_t *index, ibool dump_on_error)
UNIV_INLINE ulint btr_page_get_level_low(const page_t *page)
UNIV_INTERN rec_t * btr_get_next_user_rec(rec_t *rec, mtr_t *mtr)
UNIV_INLINE ulint btr_page_get_prev(const page_t *page, mtr_t *mtr)
UNIV_INLINE ulint btr_page_get_level(const page_t *page, mtr_t *mtr)
UNIV_INLINE ulint btr_page_get_next(const page_t *page, mtr_t *mtr)
UNIV_INTERN ulint btr_create(ulint type, ulint space, ulint zip_size, index_id_t index_id, dict_index_t *index, mtr_t *mtr)
UNIV_INTERN void btr_discard_page(btr_cur_t *cursor, mtr_t *mtr)
UNIV_INLINE index_id_t btr_page_get_index_id(const page_t *page)
UNIV_INTERN ibool btr_page_get_split_rec_to_right(btr_cur_t *cursor, rec_t **split_rec)
UNIV_INTERN ibool btr_compress(btr_cur_t *cursor, mtr_t *mtr)
UNIV_INLINE buf_block_t * btr_block_get_func(ulint space, ulint zip_size, ulint page_no, ulint mode, const char *file, ulint line, mtr_t *mtr) __attribute__((nonnull))
UNIV_INTERN byte * btr_parse_set_min_rec_mark(byte *ptr, byte *end_ptr, ulint comp, page_t *page, mtr_t *mtr)
UNIV_INTERN ibool btr_page_reorganize(buf_block_t *block, dict_index_t *index, mtr_t *mtr)
UNIV_INTERN void btr_page_free_low(dict_index_t *index, buf_block_t *block, ulint level, mtr_t *mtr)
UNIV_INTERN void btr_free_but_not_root(ulint space, ulint zip_size, ulint root_page_no)
UNIV_INTERN void btr_set_min_rec_mark(rec_t *rec, mtr_t *mtr)
UNIV_INTERN void btr_free_root(ulint space, ulint zip_size, ulint root_page_no, mtr_t *mtr)
UNIV_INTERN buf_block_t * btr_page_alloc(dict_index_t *index, ulint hint_page_no, byte file_direction, ulint level, mtr_t *mtr)
UNIV_INTERN ulint btr_get_size(dict_index_t *index, ulint flag)
UNIV_INTERN byte * btr_parse_page_reorganize(byte *ptr, byte *end_ptr, dict_index_t *index, buf_block_t *block, mtr_t *mtr)
UNIV_INLINE ulint btr_node_ptr_get_child_page_no(const rec_t *rec, const ulint *offsets)
UNIV_INTERN void btr_page_free(dict_index_t *index, buf_block_t *block, mtr_t *mtr)