diff options
Diffstat (limited to 'storage/innobase/btr')
-rw-r--r-- | storage/innobase/btr/btr0btr.cc | 56 | ||||
-rw-r--r-- | storage/innobase/btr/btr0bulk.cc | 16 | ||||
-rw-r--r-- | storage/innobase/btr/btr0cur.cc | 90 | ||||
-rw-r--r-- | storage/innobase/btr/btr0defragment.cc | 4 | ||||
-rw-r--r-- | storage/innobase/btr/btr0pcur.cc | 17 | ||||
-rw-r--r-- | storage/innobase/btr/btr0scrub.cc | 2 | ||||
-rw-r--r-- | storage/innobase/btr/btr0sea.cc | 24 |
7 files changed, 108 insertions, 101 deletions
diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc index d6755e75fb8..ec8bdf9c60d 100644 --- a/storage/innobase/btr/btr0btr.cc +++ b/storage/innobase/btr/btr0btr.cc @@ -768,7 +768,7 @@ void btr_page_free(dict_index_t* index, buf_block_t* block, mtr_t* mtr, @param[in,out] mtr mini-transaction Sets the child node file address in a node pointer. */ inline void btr_node_ptr_set_child_page_no(buf_block_t *block, - rec_t *rec, const ulint *offsets, + rec_t *rec, const offset_t *offsets, ulint page_no, mtr_t *mtr) { ut_ad(rec_offs_validate(rec, NULL, offsets)); @@ -794,7 +794,7 @@ btr_node_ptr_get_child( /*===================*/ const rec_t* node_ptr,/*!< in: node pointer */ dict_index_t* index, /*!< in: index */ - const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ + const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ mtr_t* mtr) /*!< in: mtr */ { ut_ad(rec_offs_validate(node_ptr, index, offsets)); @@ -812,10 +812,10 @@ Returns the upper level node pointer to a page. It is assumed that mtr holds an sx-latch on the tree. @return rec_get_offsets() of the node pointer record */ static -ulint* +offset_t* btr_page_get_father_node_ptr_func( /*==============================*/ - ulint* offsets,/*!< in: work area for the return value */ + offset_t* offsets,/*!< in: work area for the return value */ mem_heap_t* heap, /*!< in: memory heap to use */ btr_cur_t* cursor, /*!< in: cursor pointing to user record, out: cursor on node pointer record, @@ -919,10 +919,10 @@ Returns the upper level node pointer to a page. It is assumed that mtr holds an x-latch on the tree. @return rec_get_offsets() of the node pointer record */ static -ulint* +offset_t* btr_page_get_father_block( /*======================*/ - ulint* offsets,/*!< in: work area for the return value */ + offset_t* offsets,/*!< in: work area for the return value */ mem_heap_t* heap, /*!< in: memory heap to use */ dict_index_t* index, /*!< in: b-tree index */ buf_block_t* block, /*!< in: child page in the index */ @@ -1855,7 +1855,7 @@ btr_root_raise_and_insert( on the root page; when the function returns, the cursor is positioned on the predecessor of the inserted record */ - ulint** offsets,/*!< out: offsets on inserted record */ + offset_t** offsets,/*!< out: offsets on inserted record */ mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */ const dtuple_t* tuple, /*!< in: tuple to insert */ ulint n_ext, /*!< in: number of externally stored columns */ @@ -2194,7 +2194,7 @@ btr_page_get_split_rec( rec_t* next_rec; ulint n; mem_heap_t* heap; - ulint* offsets; + offset_t* offsets; page = btr_cur_get_page(cursor); @@ -2300,7 +2300,7 @@ btr_page_insert_fits( const rec_t* split_rec,/*!< in: suggestion for first record on upper half-page, or NULL if tuple to be inserted should be first */ - ulint** offsets,/*!< in: rec_get_offsets( + offset_t** offsets,/*!< in: rec_get_offsets( split_rec, cursor->index); out: garbage */ const dtuple_t* tuple, /*!< in: tuple to insert */ ulint n_ext, /*!< in: number of externally stored columns */ @@ -2400,8 +2400,8 @@ btr_insert_on_non_leaf_level_func( dberr_t err; rec_t* rec; mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets = offsets_; rec_offs_init(offsets_); rtr_info_t rtr_info; @@ -2501,7 +2501,7 @@ btr_attach_half_pages( if (direction == FSP_DOWN) { btr_cur_t cursor; - ulint* offsets; + offset_t* offsets; lower_block = new_block; upper_block = block; @@ -2625,7 +2625,7 @@ btr_page_tuple_smaller( /*===================*/ btr_cur_t* cursor, /*!< in: b-tree cursor */ const dtuple_t* tuple, /*!< in: tuple to consider */ - ulint** offsets,/*!< in/out: temporary storage */ + offset_t** offsets,/*!< in/out: temporary storage */ ulint n_uniq, /*!< in: number of unique fields in the index page records */ mem_heap_t** heap) /*!< in/out: heap for offsets */ @@ -2665,7 +2665,7 @@ rec_t* btr_insert_into_right_sibling( ulint flags, btr_cur_t* cursor, - ulint** offsets, + offset_t** offsets, mem_heap_t* heap, const dtuple_t* tuple, ulint n_ext, @@ -2801,7 +2801,7 @@ btr_page_split_and_insert( btr_cur_t* cursor, /*!< in: cursor at which to insert; when the function returns, the cursor is positioned on the predecessor of the inserted record */ - ulint** offsets,/*!< out: offsets on inserted record */ + offset_t** offsets,/*!< out: offsets on inserted record */ mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */ const dtuple_t* tuple, /*!< in: tuple to insert */ ulint n_ext, /*!< in: number of externally stored columns */ @@ -3298,7 +3298,7 @@ btr_lift_page_up( { btr_cur_t cursor; - ulint* offsets = NULL; + offset_t* offsets = NULL; mem_heap_t* heap = mem_heap_create( sizeof(*offsets) * (REC_OFFS_HEADER_SIZE + 1 + 1 @@ -3481,7 +3481,7 @@ btr_compress( page_t* page; btr_cur_t father_cursor; mem_heap_t* heap; - ulint* offsets; + offset_t* offsets; ulint nth_rec = 0; /* remove bogus warning */ bool mbr_changed = false; #ifdef UNIV_DEBUG @@ -3622,7 +3622,7 @@ retry: if (is_left) { btr_cur_t cursor2; rtr_mbr_t new_mbr; - ulint* offsets2 = NULL; + offset_t* offsets2 = NULL; /* For rtree, we need to update father's mbr. */ if (dict_index_is_spatial(index)) { @@ -3817,7 +3817,7 @@ retry: /* For rtree, we need to update father's mbr. */ if (dict_index_is_spatial(index)) { - ulint* offsets2; + offset_t* offsets2; ulint rec_info; offsets2 = rec_get_offsets( @@ -4045,7 +4045,7 @@ btr_discard_only_page_on_level( mem_heap_t* heap = NULL; const rec_t* rec = NULL; - ulint* offsets = NULL; + offset_t* offsets = NULL; if (index->table->instant) { const rec_t* r = page_rec_get_next(page_get_infimum_rec( block->frame)); @@ -4276,7 +4276,7 @@ btr_print_recursive( ulint width, /*!< in: print this many entries from start and end */ mem_heap_t** heap, /*!< in/out: heap for rec_get_offsets() */ - ulint** offsets,/*!< in/out: buffer for rec_get_offsets() */ + offset_t** offsets,/*!< in/out: buffer for rec_get_offsets() */ mtr_t* mtr) /*!< in: mtr */ { const page_t* page = buf_block_get_frame(block); @@ -4340,8 +4340,8 @@ btr_print_index( mtr_t mtr; buf_block_t* root; mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets = offsets_; rec_offs_init(offsets_); fputs("--------------------------\n" @@ -4375,7 +4375,7 @@ btr_check_node_ptr( { mem_heap_t* heap; dtuple_t* tuple; - ulint* offsets; + offset_t* offsets; btr_cur_t cursor; page_t* page = buf_block_get_frame(block); @@ -4455,8 +4455,8 @@ btr_index_rec_validate( ulint len; const page_t* page; mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets = offsets_; rec_offs_init(offsets_); page = page_align(rec); @@ -4721,8 +4721,8 @@ btr_validate_level( bool ret = true; mtr_t mtr; mem_heap_t* heap = mem_heap_create(256); - ulint* offsets = NULL; - ulint* offsets2= NULL; + offset_t* offsets = NULL; + offset_t* offsets2= NULL; #ifdef UNIV_ZIP_DEBUG page_zip_des_t* page_zip; #endif /* UNIV_ZIP_DEBUG */ diff --git a/storage/innobase/btr/btr0bulk.cc b/storage/innobase/btr/btr0bulk.cc index 342174118ce..51a4657a1c1 100644 --- a/storage/innobase/btr/btr0bulk.cc +++ b/storage/innobase/btr/btr0bulk.cc @@ -173,7 +173,7 @@ PageBulk::init() @param[in] rec record @param[in] offsets record offsets */ template<PageBulk::format fmt> -inline void PageBulk::insertPage(const rec_t *rec, ulint *offsets) +inline void PageBulk::insertPage(const rec_t *rec, offset_t *offsets) { ut_ad((m_page_zip != nullptr) == (fmt == COMPRESSED)); ut_ad((fmt != REDUNDANT) == m_is_comp); @@ -188,7 +188,7 @@ inline void PageBulk::insertPage(const rec_t *rec, ulint *offsets) /* Check whether records are in order. */ if (!page_rec_is_infimum(m_cur_rec)) { rec_t* old_rec = m_cur_rec; - ulint* old_offsets = rec_get_offsets( + offset_t* old_offsets = rec_get_offsets( old_rec, m_index, NULL, is_leaf, ULINT_UNDEFINED, &m_heap); @@ -246,7 +246,7 @@ inline void PageBulk::insertPage(const rec_t *rec, ulint *offsets) /** Insert a record in the page. @param[in] rec record @param[in] offsets record offsets */ -inline void PageBulk::insert(const rec_t *rec, ulint *offsets) +inline void PageBulk::insert(const rec_t *rec, offset_t *offsets) { if (UNIV_LIKELY_NULL(m_page_zip)) insertPage<COMPRESSED>(rec, offsets); @@ -426,7 +426,7 @@ rec_t* PageBulk::getSplitRec() { rec_t* rec; - ulint* offsets; + offset_t* offsets; ulint total_used_size; ulint total_recs_size; ulint n_recs; @@ -472,7 +472,7 @@ PageBulk::copyIn( { rec_t* rec = split_rec; - ulint* offsets = NULL; + offset_t* offsets = NULL; ut_ad(m_rec_no == 0); ut_ad(page_rec_is_user_rec(rec)); @@ -518,7 +518,7 @@ PageBulk::copyOut( ut_ad(n > 0); /* Set last record's next in page */ - ulint* offsets = NULL; + offset_t* offsets = NULL; rec = page_rec_get_prev(split_rec); offsets = rec_get_offsets(rec, m_index, offsets, page_rec_is_leaf(split_rec), @@ -624,7 +624,7 @@ the blob data is logged first, then the record is logged in bulk mode. dberr_t PageBulk::storeExt( const big_rec_t* big_rec, - ulint* offsets) + offset_t* offsets) { /* Note: not all fileds are initialized in btr_pcur. */ btr_pcur_t btr_pcur; @@ -885,7 +885,7 @@ BtrBulk::insert( ulint rec_size = rec_get_converted_size(m_index, tuple, n_ext); big_rec_t* big_rec = NULL; rec_t* rec = NULL; - ulint* offsets = NULL; + offset_t* offsets = NULL; if (page_bulk->needExt(tuple, rec_size)) { /* The record is so big that we have to store some fields diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index ff316e575db..b82c19f1546 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -157,7 +157,7 @@ btr_cur_unmark_extern_fields( buf_block_t* block, /*!< in/out: index page */ rec_t* rec, /*!< in/out: record in a clustered index */ dict_index_t* index, /*!< in: index of the page */ - const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ + const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ mtr_t* mtr); /*!< in: mtr, or NULL if not logged */ /*******************************************************************//** Adds path information to the cursor for the current page, for which @@ -181,7 +181,7 @@ btr_rec_free_updated_extern_fields( X-latched */ rec_t* rec, /*!< in: record */ buf_block_t* block, /*!< in: index page of rec */ - const ulint* offsets,/*!< in: rec_get_offsets(rec, index) */ + const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ const upd_t* update, /*!< in: update vector */ bool rollback,/*!< in: performing rollback? */ mtr_t* mtr); /*!< in: mini-transaction handle which contains @@ -195,7 +195,7 @@ btr_rec_free_externally_stored_fields( dict_index_t* index, /*!< in: index of the data, the index tree MUST be X-latched */ rec_t* rec, /*!< in: record */ - const ulint* offsets,/*!< in: rec_get_offsets(rec, index) */ + const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ buf_block_t* block, /*!< in: index page of rec */ bool rollback,/*!< in: performing rollback? */ mtr_t* mtr); /*!< in: mini-transaction handle which contains @@ -590,8 +590,8 @@ incompatible: } mem_heap_t* heap = NULL; - ulint* offsets = rec_get_offsets(rec, index, NULL, true, - ULINT_UNDEFINED, &heap); + offset_t* offsets = rec_get_offsets(rec, index, NULL, true, + ULINT_UNDEFINED, &heap); if (rec_offs_any_default(offsets)) { inconsistent: mem_heap_free(heap); @@ -1266,10 +1266,10 @@ btr_cur_search_to_nth_level_func( btr_search_t* info; #endif /* BTR_CUR_ADAPT */ mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; - ulint offsets2_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets2 = offsets2_; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets = offsets_; + offset_t offsets2_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets2 = offsets2_; rec_offs_init(offsets_); rec_offs_init(offsets2_); /* Currently, PAGE_CUR_LE is the only search mode used for searches @@ -2525,8 +2525,8 @@ btr_cur_open_at_index_side_func( ulint n_blocks = 0; ulint n_releases = 0; mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets = offsets_; dberr_t err = DB_SUCCESS; rec_offs_init(offsets_); @@ -2876,8 +2876,8 @@ btr_cur_open_at_rnd_pos_func( ulint n_blocks = 0; ulint n_releases = 0; mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets = offsets_; rec_offs_init(offsets_); ut_ad(!index->is_spatial()); @@ -3165,7 +3165,7 @@ btr_cur_insert_if_possible( cursor stays valid */ const dtuple_t* tuple, /*!< in: tuple to insert; the size info need not have been stored to tuple */ - ulint** offsets,/*!< out: offsets on *rec */ + offset_t** offsets,/*!< out: offsets on *rec */ mem_heap_t** heap, /*!< in/out: pointer to memory heap, or NULL */ ulint n_ext, /*!< in: number of externally stored columns */ mtr_t* mtr) /*!< in/out: mini-transaction */ @@ -3327,7 +3327,7 @@ btr_cur_optimistic_insert( specified */ btr_cur_t* cursor, /*!< in: cursor on page after which to insert; cursor stays valid */ - ulint** offsets,/*!< out: offsets on *rec */ + offset_t** offsets,/*!< out: offsets on *rec */ mem_heap_t** heap, /*!< in/out: pointer to memory heap */ dtuple_t* entry, /*!< in/out: entry to insert */ rec_t** rec, /*!< out: pointer to inserted record if @@ -3632,7 +3632,7 @@ btr_cur_pessimistic_insert( insertion will certainly succeed */ btr_cur_t* cursor, /*!< in: cursor after which to insert; cursor stays valid */ - ulint** offsets,/*!< out: offsets on *rec */ + offset_t** offsets,/*!< out: offsets on *rec */ mem_heap_t** heap, /*!< in/out: pointer to memory heap that can be emptied */ dtuple_t* entry, /*!< in/out: entry to insert */ @@ -3805,7 +3805,7 @@ btr_cur_upd_lock_and_undo( /*======================*/ ulint flags, /*!< in: undo logging and locking flags */ btr_cur_t* cursor, /*!< in: cursor on record to update */ - const ulint* offsets,/*!< in: rec_get_offsets() on cursor */ + const offset_t* offsets,/*!< in: rec_get_offsets() on cursor */ const upd_t* update, /*!< in: update vector */ ulint cmpl_info,/*!< in: compiler info on secondary index updates */ @@ -3979,7 +3979,7 @@ btr_cur_parse_update_in_place( roll_ptr_t roll_ptr; ulint rec_offset; mem_heap_t* heap; - ulint* offsets; + offset_t* offsets; if (end_ptr < ptr + 1) { @@ -4064,7 +4064,7 @@ btr_cur_update_alloc_zip_func( page_cur_t* cursor, /*!< in/out: B-tree page cursor */ dict_index_t* index, /*!< in: the index corresponding to cursor */ #ifdef UNIV_DEBUG - ulint* offsets,/*!< in/out: offsets of the cursor record */ + offset_t* offsets,/*!< in/out: offsets of the cursor record */ #endif /* UNIV_DEBUG */ ulint length, /*!< in: size needed */ bool create, /*!< in: true=delete-and-insert, @@ -4146,7 +4146,7 @@ btr_cur_update_in_place( btr_cur_t* cursor, /*!< in: cursor on the record to update; cursor stays valid and positioned on the same record */ - ulint* offsets,/*!< in/out: offsets on cursor->page_cur.rec */ + offset_t* offsets,/*!< in/out: offsets on cursor->page_cur.rec */ const upd_t* update, /*!< in: update vector */ ulint cmpl_info,/*!< in: compiler info on secondary index updates */ @@ -4436,7 +4436,7 @@ btr_cur_optimistic_update( btr_cur_t* cursor, /*!< in: cursor on the record to update; cursor stays valid and positioned on the same record */ - ulint** offsets,/*!< out: offsets on cursor->page_cur.rec */ + offset_t** offsets,/*!< out: offsets on cursor->page_cur.rec */ mem_heap_t** heap, /*!< in/out: pointer to NULL or memory heap */ const upd_t* update, /*!< in: update vector; this must also contain trx id and roll ptr fields */ @@ -4774,7 +4774,7 @@ btr_cur_pessimistic_update( btr_cur_t* cursor, /*!< in/out: cursor on the record to update; cursor may become invalid if *big_rec == NULL || !(flags & BTR_KEEP_POS_FLAG) */ - ulint** offsets,/*!< out: offsets on cursor->page_cur.rec */ + offset_t** offsets,/*!< out: offsets on cursor->page_cur.rec */ mem_heap_t** offsets_heap, /*!< in/out: pointer to memory heap that can be emptied */ @@ -5327,7 +5327,7 @@ btr_cur_parse_del_mark_set_clust_rec( clustered index fields. */ ut_ad(pos <= MAX_REF_PARTS); - ulint offsets[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2]; + offset_t offsets[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2]; rec_offs_init(offsets); mem_heap_t* heap = NULL; @@ -5370,7 +5370,7 @@ btr_cur_del_mark_set_clust_rec( buf_block_t* block, /*!< in/out: buffer block of the record */ rec_t* rec, /*!< in/out: record */ dict_index_t* index, /*!< in: clustered index of the record */ - const ulint* offsets,/*!< in: rec_get_offsets(rec) */ + const offset_t* offsets,/*!< in: rec_get_offsets(rec) */ que_thr_t* thr, /*!< in: query thread */ const dtuple_t* entry, /*!< in: dtuple for the deleting record, also contains the virtual cols if there are any */ @@ -5653,8 +5653,8 @@ btr_cur_optimistic_delete_func( buf_block_t* block; rec_t* rec; mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets = offsets_; ibool no_compress_needed; rec_offs_init(offsets_); @@ -5836,7 +5836,7 @@ btr_cur_pessimistic_delete( bool success; ibool ret = FALSE; mem_heap_t* heap; - ulint* offsets; + offset_t* offsets; #ifdef UNIV_DEBUG bool parent_latched = false; #endif /* UNIV_DEBUG */ @@ -5988,7 +5988,7 @@ discard_page: rtr_mbr_t father_mbr; rec_t* father_rec; btr_cur_t father_cursor; - ulint* offsets; + offset_t* offsets; bool upd_ret; ulint len; @@ -6730,7 +6730,7 @@ btr_record_not_null_field_in_rec( ulint n_unique, /*!< in: dict_index_get_n_unique(index), number of columns uniquely determine an index entry */ - const ulint* offsets, /*!< in: rec_get_offsets(rec, index), + const offset_t* offsets, /*!< in: rec_get_offsets(rec, index), its size could be for all fields or that of "n_unique" */ ib_uint64_t* n_not_null) /*!< in/out: array to record number of @@ -6784,8 +6784,8 @@ btr_estimate_number_of_different_key_vals( uintmax_t add_on; mtr_t mtr; mem_heap_t* heap = NULL; - ulint* offsets_rec = NULL; - ulint* offsets_next_rec = NULL; + offset_t* offsets_rec = NULL; + offset_t* offsets_next_rec = NULL; /* For spatial index, there is no such stats can be fetched. */ @@ -6973,7 +6973,7 @@ btr_estimate_number_of_different_key_vals( and assign the old offsets_rec buffer to offsets_next_rec. */ { - ulint* offsets_tmp = offsets_rec; + offset_t* offsets_tmp = offsets_rec; offsets_rec = offsets_next_rec; offsets_next_rec = offsets_tmp; } @@ -7058,7 +7058,7 @@ static ulint btr_rec_get_field_ref_offs( /*=======================*/ - const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ + const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ ulint n) /*!< in: index of the external field */ { ulint field_ref_offs; @@ -7087,7 +7087,7 @@ btr_rec_get_field_ref_offs( ulint btr_rec_get_externally_stored_len( const rec_t* rec, - const ulint* offsets) + const offset_t* offsets) { ulint n_fields; ulint total_extern_len = 0; @@ -7125,7 +7125,7 @@ btr_cur_set_ownership_of_extern_field( buf_block_t* block, /*!< in/out: index page */ rec_t* rec, /*!< in/out: clustered index record */ dict_index_t* index, /*!< in: index of the page */ - const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ + const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ ulint i, /*!< in: field number */ bool val, /*!< in: value to set */ mtr_t* mtr) /*!< in: mtr, or NULL if not logged */ @@ -7172,7 +7172,7 @@ btr_cur_disown_inherited_fields( buf_block_t* block, /*!< in/out: index page */ rec_t* rec, /*!< in/out: record in a clustered index */ dict_index_t* index, /*!< in: index of the page */ - const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ + const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ const upd_t* update, /*!< in: update vector */ mtr_t* mtr) /*!< in/out: mini-transaction */ { @@ -7202,7 +7202,7 @@ btr_cur_unmark_extern_fields( buf_block_t* block, /*!< in/out: index page */ rec_t* rec, /*!< in/out: record in a clustered index */ dict_index_t* index, /*!< in: index of the page */ - const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ + const offset_t* offsets,/*!< in: array returned by rec_get_offsets() */ mtr_t* mtr) /*!< in: mtr, or NULL if not logged */ { ut_ad(!rec_offs_comp(offsets) || !rec_get_node_ptr_flag(rec)); @@ -7374,7 +7374,7 @@ struct btr_blob_log_check_t { /** Mini transaction holding the latches for m_pcur */ mtr_t* m_mtr; /** rec_get_offsets(rec, index); offset of clust_rec */ - const ulint* m_offsets; + const offset_t* m_offsets; /** The block containing clustered record */ buf_block_t** m_block; /** The clustered record pointer */ @@ -7394,7 +7394,7 @@ struct btr_blob_log_check_t { btr_blob_log_check_t( btr_pcur_t* pcur, mtr_t* mtr, - const ulint* offsets, + const offset_t* offsets, buf_block_t** block, rec_t** rec, enum blob_op op) @@ -7461,7 +7461,7 @@ struct btr_blob_log_check_t { *m_rec = btr_pcur_get_rec(m_pcur); rec_offs_make_valid(*m_rec, index, true, - const_cast<ulint*>(m_offsets)); + const_cast<offset_t*>(m_offsets)); ut_ad(m_mtr->memo_contains_page_flagged( *m_rec, @@ -7492,7 +7492,7 @@ btr_store_big_rec_extern_fields( btr_pcur_t* pcur, /*!< in/out: a persistent cursor. if btr_mtr is restarted, then this can be repositioned. */ - ulint* offsets, /*!< in/out: rec_get_offsets() on + offset_t* offsets, /*!< in/out: rec_get_offsets() on pcur. the "external storage" flags in offsets will correctly correspond to rec when this function returns */ @@ -7981,7 +7981,7 @@ btr_free_externally_stored_field( byte* field_ref, /*!< in/out: field reference */ const rec_t* rec, /*!< in: record containing field_ref, for page_zip_write_blob_ptr(), or NULL */ - const ulint* offsets, /*!< in: rec_get_offsets(rec, index), + const offset_t* offsets, /*!< in: rec_get_offsets(rec, index), or NULL */ buf_block_t* block, /*!< in/out: page of field_ref */ ulint i, /*!< in: field number of field_ref; @@ -8147,7 +8147,7 @@ btr_rec_free_externally_stored_fields( dict_index_t* index, /*!< in: index of the data, the index tree MUST be X-latched */ rec_t* rec, /*!< in/out: record */ - const ulint* offsets,/*!< in: rec_get_offsets(rec, index) */ + const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ buf_block_t* block, /*!< in: index page of rec */ bool rollback,/*!< in: performing rollback? */ mtr_t* mtr) /*!< in: mini-transaction handle which contains @@ -8186,7 +8186,7 @@ btr_rec_free_updated_extern_fields( X-latched */ rec_t* rec, /*!< in/out: record */ buf_block_t* block, /*!< in: index page of rec */ - const ulint* offsets,/*!< in: rec_get_offsets(rec, index) */ + const offset_t* offsets,/*!< in: rec_get_offsets(rec, index) */ const upd_t* update, /*!< in: update vector */ bool rollback,/*!< in: performing rollback? */ mtr_t* mtr) /*!< in: mini-transaction handle which contains @@ -8583,7 +8583,7 @@ protected by a lock or a page latch byte* btr_rec_copy_externally_stored_field( const rec_t* rec, - const ulint* offsets, + const offset_t* offsets, ulint zip_size, ulint no, ulint* len, diff --git a/storage/innobase/btr/btr0defragment.cc b/storage/innobase/btr/btr0defragment.cc index 300d66456e6..bae0731013c 100644 --- a/storage/innobase/btr/btr0defragment.cc +++ b/storage/innobase/btr/btr0defragment.cc @@ -367,8 +367,8 @@ btr_defragment_calc_n_recs_for_size( { page_t* page = buf_block_get_frame(block); ulint n_recs = 0; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets = offsets_; rec_offs_init(offsets_); mem_heap_t* heap = NULL; ulint size = 0; diff --git a/storage/innobase/btr/btr0pcur.cc b/storage/innobase/btr/btr0pcur.cc index 515a255f170..fb08f0229e3 100644 --- a/storage/innobase/btr/btr0pcur.cc +++ b/storage/innobase/btr/btr0pcur.cc @@ -326,16 +326,21 @@ btr_pcur_restore_position_func( if (cursor->rel_pos == BTR_PCUR_ON) { #ifdef UNIV_DEBUG const rec_t* rec; - const ulint* offsets1; - const ulint* offsets2; + offset_t offsets1_[REC_OFFS_NORMAL_SIZE]; + offset_t offsets2_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets1 = offsets1_; + offset_t* offsets2 = offsets2_; rec = btr_pcur_get_rec(cursor); + rec_offs_init(offsets1_); + rec_offs_init(offsets2_); + heap = mem_heap_create(256); offsets1 = rec_get_offsets( - cursor->old_rec, index, NULL, true, + cursor->old_rec, index, offsets1, true, cursor->old_n_fields, &heap); offsets2 = rec_get_offsets( - rec, index, NULL, true, + rec, index, offsets2, true, cursor->old_n_fields, &heap); ut_ad(!cmp_rec_rec(cursor->old_rec, @@ -394,11 +399,13 @@ btr_pcur_restore_position_func( ut_ad(cursor->rel_pos == BTR_PCUR_ON || cursor->rel_pos == BTR_PCUR_BEFORE || cursor->rel_pos == BTR_PCUR_AFTER); + offset_t offsets[REC_OFFS_NORMAL_SIZE]; + rec_offs_init(offsets); if (cursor->rel_pos == BTR_PCUR_ON && btr_pcur_is_on_user_rec(cursor) && !cmp_dtuple_rec(tuple, btr_pcur_get_rec(cursor), rec_get_offsets(btr_pcur_get_rec(cursor), - index, NULL, true, + index, offsets, true, ULINT_UNDEFINED, &heap))) { /* We have to store the NEW value for the modify clock, diff --git a/storage/innobase/btr/btr0scrub.cc b/storage/innobase/btr/btr0scrub.cc index 9fdb942c1a5..5caf4769a9c 100644 --- a/storage/innobase/btr/btr0scrub.cc +++ b/storage/innobase/btr/btr0scrub.cc @@ -474,7 +474,7 @@ btr_pessimistic_scrub( /* arguments to btr_page_split_and_insert */ mem_heap_t* heap = NULL; dtuple_t* entry = NULL; - ulint* offsets = NULL; + offset_t* offsets = NULL; ulint n_ext = 0; ulint flags = BTR_MODIFY_TREE; diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc index 5159caed3aa..ae30dec61ca 100644 --- a/storage/innobase/btr/btr0sea.cc +++ b/storage/innobase/btr/btr0sea.cc @@ -97,7 +97,7 @@ static inline ulint rec_fold( const rec_t* rec, - const ulint* offsets, + const offset_t* offsets, ulint n_fields, ulint n_bytes, index_id_t tree_id) @@ -669,7 +669,7 @@ btr_search_update_hash_ref( && (block->curr_n_bytes == info->n_bytes) && (block->curr_left_side == info->left_side)) { mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; rec_offs_init(offsets_); rec = btr_cur_get_rec(cursor); @@ -722,8 +722,8 @@ btr_search_check_guess( ulint match; int cmp; mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets = offsets_; ibool success = FALSE; rec_offs_init(offsets_); @@ -1107,7 +1107,7 @@ void btr_search_drop_page_hash_index(buf_block_t* block) ulint i; mem_heap_t* heap; const dict_index_t* index; - ulint* offsets; + offset_t* offsets; rw_lock_t* latch; btr_search_t* info; @@ -1362,8 +1362,8 @@ btr_search_build_page_hash_index( const rec_t** recs; ulint i; mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets = offsets_; #ifdef MYSQL_INDEX_DISABLE_AHI if (index->disable_ahi) return; @@ -1667,7 +1667,7 @@ void btr_search_update_hash_on_delete(btr_cur_t* cursor) const rec_t* rec; ulint fold; dict_index_t* index; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; mem_heap_t* heap = NULL; rec_offs_init(offsets_); @@ -1822,8 +1822,8 @@ btr_search_update_hash_on_insert(btr_cur_t* cursor, rw_lock_t* ahi_latch) ibool left_side; bool locked = false; mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets = offsets_; rec_offs_init(offsets_); ut_ad(ahi_latch == btr_get_search_latch(cursor->index)); @@ -1980,8 +1980,8 @@ btr_search_hash_table_validate(ulint hash_table_id) ulint i; ulint cell_count; mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; + offset_t offsets_[REC_OFFS_NORMAL_SIZE]; + offset_t* offsets = offsets_; if (!btr_search_enabled) { return(TRUE); |