Loading innobase/btr/btr0btr.c +8 −6 Original line number Diff line number Diff line Loading @@ -567,8 +567,9 @@ btr_page_get_father_for_rec( btr_cur_t cursor; rec_t* node_ptr; dict_index_t* index; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; ut_ad(mtr_memo_contains(mtr, dict_tree_get_lock(tree), MTR_MEMO_X_LOCK)); Loading Loading @@ -2098,7 +2099,8 @@ btr_compress( btr_node_ptr_delete(tree, page, mtr); } else { mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; *offsets_ = (sizeof offsets_) / sizeof *offsets_; /* Replace the address of the old child node (= page) with the address of the merge page to the right */ Loading Loading @@ -2387,9 +2389,9 @@ btr_print_tree( mtr_t mtr; page_t* root; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; fputs("--------------------------\n" "INDEX TREE PRINT\n", stderr); Loading Loading @@ -2489,9 +2491,9 @@ btr_index_rec_validate( ulint i; page_t* page; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; page = buf_frame_align(rec); Loading innobase/btr/btr0cur.c +22 −10 Original line number Diff line number Diff line Loading @@ -275,8 +275,9 @@ btr_cur_search_to_nth_level( btr_search_t* info; #endif mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; /* Currently, PAGE_CUR_LE is the only search mode used for searches ending to upper levels */ Loading Loading @@ -578,8 +579,9 @@ btr_cur_open_at_index_side( ulint estimate; ulint savepoint; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; estimate = latch_mode & BTR_ESTIMATE; latch_mode = latch_mode & ~BTR_ESTIMATE; Loading Loading @@ -703,8 +705,9 @@ btr_cur_open_at_rnd_pos( ulint height; rec_t* node_ptr; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; tree = index->tree; Loading Loading @@ -1252,7 +1255,9 @@ btr_cur_upd_lock_and_undo( if (!(flags & BTR_NO_LOCKING_FLAG)) { mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; *offsets_ = (sizeof offsets_) / sizeof *offsets_; err = lock_clust_rec_modify_check_and_lock(flags, rec, index, rec_get_offsets(rec, index, offsets_, ULINT_UNDEFINED, &heap), thr); Loading Loading @@ -1426,8 +1431,9 @@ btr_cur_update_in_place( trx_t* trx; ibool was_delete_marked; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; rec = btr_cur_get_rec(cursor); index = cursor->index; Loading Loading @@ -2065,7 +2071,9 @@ btr_cur_parse_del_mark_set_clust_rec( if (!(flags & BTR_KEEP_SYS_FLAG)) { mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; *offsets_ = (sizeof offsets_) / sizeof *offsets_; row_upd_rec_sys_fields_in_recovery(rec, rec_get_offsets(rec, index, offsets_, ULINT_UNDEFINED, &heap), Loading Loading @@ -2109,8 +2117,9 @@ btr_cur_del_mark_set_clust_rec( rec_t* rec; trx_t* trx; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; rec = btr_cur_get_rec(cursor); index = cursor->index; Loading Loading @@ -2399,9 +2408,10 @@ btr_cur_optimistic_delete( ulint max_ins_size; rec_t* rec; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; ibool no_compress_needed; *offsets_ = (sizeof offsets_) / sizeof *offsets_; ut_ad(mtr_memo_contains(mtr, buf_block_align(btr_cur_get_page(cursor)), MTR_MEMO_PAGE_X_FIX)); Loading Loading @@ -2803,10 +2813,12 @@ btr_estimate_number_of_different_key_vals( ulint add_on; mtr_t mtr; mem_heap_t* heap = NULL; ulint offsets1_[100] = { 100, }; ulint offsets2_[100] = { 100, }; ulint offsets1_[REC_OFFS_NORMAL_SIZE]; ulint offsets2_[REC_OFFS_NORMAL_SIZE]; ulint* offsets1 = offsets1_; ulint* offsets2 = offsets2_; *offsets1_ = (sizeof offsets1_) / sizeof *offsets1_; *offsets2_ = (sizeof offsets2_) / sizeof *offsets2_; n_cols = dict_index_get_n_unique(index); Loading innobase/btr/btr0sea.c +12 −6 Original line number Diff line number Diff line Loading @@ -420,7 +420,8 @@ btr_search_update_hash_ref( && (block->curr_n_bytes == info->n_bytes) && (block->curr_side == info->side)) { mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; *offsets_ = (sizeof offsets_) / sizeof *offsets_; rec = btr_cur_get_rec(cursor); Loading Loading @@ -552,9 +553,10 @@ btr_search_check_guess( ulint bytes; int cmp; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; ibool success = FALSE; *offsets_ = (sizeof offsets_) / sizeof *offsets_; n_unique = dict_index_get_n_unique_in_tree(cursor->index); Loading Loading @@ -1098,8 +1100,9 @@ btr_search_build_page_hash_index( rec_t** recs; ulint i; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; ut_ad(index); Loading Loading @@ -1341,8 +1344,9 @@ btr_search_update_hash_on_delete( ulint fold; dulint tree_id; ibool found; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; mem_heap_t* heap = NULL; *offsets_ = (sizeof offsets_) / sizeof *offsets_; rec = btr_cur_get_rec(cursor); Loading Loading @@ -1452,8 +1456,9 @@ btr_search_update_hash_on_insert( ulint side; ibool locked = FALSE; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; table = btr_search_sys->hash_index; Loading Loading @@ -1591,8 +1596,9 @@ btr_search_validate(void) ibool ok = TRUE; ulint i; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; rw_lock_x_lock(&btr_search_latch); Loading innobase/include/rem0rec.h +5 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,11 @@ in addition to the data and the offsets */ #define REC_STATUS_INFIMUM 2 #define REC_STATUS_SUPREMUM 3 /* Number of elements that should be initially allocated for the offsets[] array, first passed to rec_get_offsets() */ #define REC_OFFS_NORMAL_SIZE 100 #define REC_OFFS_SMALL_SIZE 10 /********************************************************** The following function is used to get the offset of the next chained record on the same page. */ Loading innobase/lock/lock0lock.c +17 −9 Original line number Diff line number Diff line Loading @@ -4094,8 +4094,9 @@ lock_rec_print( ulint i; mtr_t mtr; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; #ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); Loading Loading @@ -4592,8 +4593,9 @@ lock_rec_validate_page( ulint i; mtr_t mtr; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; #ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); Loading Loading @@ -4841,9 +4843,11 @@ lock_rec_insert_check_and_lock( #ifdef UNIV_DEBUG { mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; const ulint* offsets = rec_get_offsets( next_rec, index, offsets_, ulint offsets_[REC_OFFS_NORMAL_SIZE]; const ulint* offsets; *offsets_ = (sizeof offsets_) / sizeof *offsets_; offsets = rec_get_offsets(next_rec, index, offsets_, ULINT_UNDEFINED, &heap); ut_ad(lock_rec_queue_validate(next_rec, index, offsets)); if (heap) { Loading Loading @@ -4988,9 +4992,12 @@ lock_sec_rec_modify_check_and_lock( #ifdef UNIV_DEBUG { mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; const ulint* offsets = rec_get_offsets( rec, index, offsets_, ULINT_UNDEFINED, &heap); ulint offsets_[REC_OFFS_NORMAL_SIZE]; const ulint* offsets; *offsets_ = (sizeof offsets_) / sizeof *offsets_; offsets = rec_get_offsets(rec, index, offsets_, ULINT_UNDEFINED, &heap); ut_ad(lock_rec_queue_validate(rec, index, offsets)); if (heap) { mem_heap_free(heap); Loading Loading @@ -5159,9 +5166,10 @@ lock_clust_rec_read_check_and_lock_alt( que_thr_t* thr) /* in: query thread */ { mem_heap_t* tmp_heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; ulint ret; *offsets_ = (sizeof offsets_) / sizeof *offsets_; offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &tmp_heap); Loading Loading
innobase/btr/btr0btr.c +8 −6 Original line number Diff line number Diff line Loading @@ -567,8 +567,9 @@ btr_page_get_father_for_rec( btr_cur_t cursor; rec_t* node_ptr; dict_index_t* index; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; ut_ad(mtr_memo_contains(mtr, dict_tree_get_lock(tree), MTR_MEMO_X_LOCK)); Loading Loading @@ -2098,7 +2099,8 @@ btr_compress( btr_node_ptr_delete(tree, page, mtr); } else { mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; *offsets_ = (sizeof offsets_) / sizeof *offsets_; /* Replace the address of the old child node (= page) with the address of the merge page to the right */ Loading Loading @@ -2387,9 +2389,9 @@ btr_print_tree( mtr_t mtr; page_t* root; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; fputs("--------------------------\n" "INDEX TREE PRINT\n", stderr); Loading Loading @@ -2489,9 +2491,9 @@ btr_index_rec_validate( ulint i; page_t* page; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; page = buf_frame_align(rec); Loading
innobase/btr/btr0cur.c +22 −10 Original line number Diff line number Diff line Loading @@ -275,8 +275,9 @@ btr_cur_search_to_nth_level( btr_search_t* info; #endif mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; /* Currently, PAGE_CUR_LE is the only search mode used for searches ending to upper levels */ Loading Loading @@ -578,8 +579,9 @@ btr_cur_open_at_index_side( ulint estimate; ulint savepoint; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; estimate = latch_mode & BTR_ESTIMATE; latch_mode = latch_mode & ~BTR_ESTIMATE; Loading Loading @@ -703,8 +705,9 @@ btr_cur_open_at_rnd_pos( ulint height; rec_t* node_ptr; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; tree = index->tree; Loading Loading @@ -1252,7 +1255,9 @@ btr_cur_upd_lock_and_undo( if (!(flags & BTR_NO_LOCKING_FLAG)) { mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; *offsets_ = (sizeof offsets_) / sizeof *offsets_; err = lock_clust_rec_modify_check_and_lock(flags, rec, index, rec_get_offsets(rec, index, offsets_, ULINT_UNDEFINED, &heap), thr); Loading Loading @@ -1426,8 +1431,9 @@ btr_cur_update_in_place( trx_t* trx; ibool was_delete_marked; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; rec = btr_cur_get_rec(cursor); index = cursor->index; Loading Loading @@ -2065,7 +2071,9 @@ btr_cur_parse_del_mark_set_clust_rec( if (!(flags & BTR_KEEP_SYS_FLAG)) { mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; *offsets_ = (sizeof offsets_) / sizeof *offsets_; row_upd_rec_sys_fields_in_recovery(rec, rec_get_offsets(rec, index, offsets_, ULINT_UNDEFINED, &heap), Loading Loading @@ -2109,8 +2117,9 @@ btr_cur_del_mark_set_clust_rec( rec_t* rec; trx_t* trx; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; rec = btr_cur_get_rec(cursor); index = cursor->index; Loading Loading @@ -2399,9 +2408,10 @@ btr_cur_optimistic_delete( ulint max_ins_size; rec_t* rec; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; ibool no_compress_needed; *offsets_ = (sizeof offsets_) / sizeof *offsets_; ut_ad(mtr_memo_contains(mtr, buf_block_align(btr_cur_get_page(cursor)), MTR_MEMO_PAGE_X_FIX)); Loading Loading @@ -2803,10 +2813,12 @@ btr_estimate_number_of_different_key_vals( ulint add_on; mtr_t mtr; mem_heap_t* heap = NULL; ulint offsets1_[100] = { 100, }; ulint offsets2_[100] = { 100, }; ulint offsets1_[REC_OFFS_NORMAL_SIZE]; ulint offsets2_[REC_OFFS_NORMAL_SIZE]; ulint* offsets1 = offsets1_; ulint* offsets2 = offsets2_; *offsets1_ = (sizeof offsets1_) / sizeof *offsets1_; *offsets2_ = (sizeof offsets2_) / sizeof *offsets2_; n_cols = dict_index_get_n_unique(index); Loading
innobase/btr/btr0sea.c +12 −6 Original line number Diff line number Diff line Loading @@ -420,7 +420,8 @@ btr_search_update_hash_ref( && (block->curr_n_bytes == info->n_bytes) && (block->curr_side == info->side)) { mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; *offsets_ = (sizeof offsets_) / sizeof *offsets_; rec = btr_cur_get_rec(cursor); Loading Loading @@ -552,9 +553,10 @@ btr_search_check_guess( ulint bytes; int cmp; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; ibool success = FALSE; *offsets_ = (sizeof offsets_) / sizeof *offsets_; n_unique = dict_index_get_n_unique_in_tree(cursor->index); Loading Loading @@ -1098,8 +1100,9 @@ btr_search_build_page_hash_index( rec_t** recs; ulint i; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; ut_ad(index); Loading Loading @@ -1341,8 +1344,9 @@ btr_search_update_hash_on_delete( ulint fold; dulint tree_id; ibool found; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; mem_heap_t* heap = NULL; *offsets_ = (sizeof offsets_) / sizeof *offsets_; rec = btr_cur_get_rec(cursor); Loading Loading @@ -1452,8 +1456,9 @@ btr_search_update_hash_on_insert( ulint side; ibool locked = FALSE; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; table = btr_search_sys->hash_index; Loading Loading @@ -1591,8 +1596,9 @@ btr_search_validate(void) ibool ok = TRUE; ulint i; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; rw_lock_x_lock(&btr_search_latch); Loading
innobase/include/rem0rec.h +5 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,11 @@ in addition to the data and the offsets */ #define REC_STATUS_INFIMUM 2 #define REC_STATUS_SUPREMUM 3 /* Number of elements that should be initially allocated for the offsets[] array, first passed to rec_get_offsets() */ #define REC_OFFS_NORMAL_SIZE 100 #define REC_OFFS_SMALL_SIZE 10 /********************************************************** The following function is used to get the offset of the next chained record on the same page. */ Loading
innobase/lock/lock0lock.c +17 −9 Original line number Diff line number Diff line Loading @@ -4094,8 +4094,9 @@ lock_rec_print( ulint i; mtr_t mtr; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; #ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); Loading Loading @@ -4592,8 +4593,9 @@ lock_rec_validate_page( ulint i; mtr_t mtr; mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; #ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); Loading Loading @@ -4841,9 +4843,11 @@ lock_rec_insert_check_and_lock( #ifdef UNIV_DEBUG { mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; const ulint* offsets = rec_get_offsets( next_rec, index, offsets_, ulint offsets_[REC_OFFS_NORMAL_SIZE]; const ulint* offsets; *offsets_ = (sizeof offsets_) / sizeof *offsets_; offsets = rec_get_offsets(next_rec, index, offsets_, ULINT_UNDEFINED, &heap); ut_ad(lock_rec_queue_validate(next_rec, index, offsets)); if (heap) { Loading Loading @@ -4988,9 +4992,12 @@ lock_sec_rec_modify_check_and_lock( #ifdef UNIV_DEBUG { mem_heap_t* heap = NULL; ulint offsets_[100] = { 100, }; const ulint* offsets = rec_get_offsets( rec, index, offsets_, ULINT_UNDEFINED, &heap); ulint offsets_[REC_OFFS_NORMAL_SIZE]; const ulint* offsets; *offsets_ = (sizeof offsets_) / sizeof *offsets_; offsets = rec_get_offsets(rec, index, offsets_, ULINT_UNDEFINED, &heap); ut_ad(lock_rec_queue_validate(rec, index, offsets)); if (heap) { mem_heap_free(heap); Loading Loading @@ -5159,9 +5166,10 @@ lock_clust_rec_read_check_and_lock_alt( que_thr_t* thr) /* in: query thread */ { mem_heap_t* tmp_heap = NULL; ulint offsets_[100] = { 100, }; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; ulint ret; *offsets_ = (sizeof offsets_) / sizeof *offsets_; offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &tmp_heap); Loading