Commit c4ace2a4 authored by marko@hundin.mysql.fi's avatar marko@hundin.mysql.fi

InnoDB: Introduce the symbols REC_OFFS_NORMAL_SIZE and

REC_OFFS_SMALL_SIZE for the initial allocation sizes of
arrays passed to rec_get_offsets().
parent 6920a6d5
...@@ -567,7 +567,7 @@ btr_page_get_father_for_rec( ...@@ -567,7 +567,7 @@ btr_page_get_father_for_rec(
btr_cur_t cursor; btr_cur_t cursor;
rec_t* node_ptr; rec_t* node_ptr;
dict_index_t* index; dict_index_t* index;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -2099,7 +2099,7 @@ btr_compress( ...@@ -2099,7 +2099,7 @@ btr_compress(
btr_node_ptr_delete(tree, page, mtr); btr_node_ptr_delete(tree, page, mtr);
} else { } else {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
/* Replace the address of the old child node (= page) with the /* Replace the address of the old child node (= page) with the
address of the merge page to the right */ address of the merge page to the right */
...@@ -2389,7 +2389,7 @@ btr_print_tree( ...@@ -2389,7 +2389,7 @@ btr_print_tree(
mtr_t mtr; mtr_t mtr;
page_t* root; page_t* root;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -2491,7 +2491,7 @@ btr_index_rec_validate( ...@@ -2491,7 +2491,7 @@ btr_index_rec_validate(
ulint i; ulint i;
page_t* page; page_t* page;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
......
...@@ -275,7 +275,7 @@ btr_cur_search_to_nth_level( ...@@ -275,7 +275,7 @@ btr_cur_search_to_nth_level(
btr_search_t* info; btr_search_t* info;
#endif #endif
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
/* Currently, PAGE_CUR_LE is the only search mode used for searches /* Currently, PAGE_CUR_LE is the only search mode used for searches
...@@ -579,7 +579,7 @@ btr_cur_open_at_index_side( ...@@ -579,7 +579,7 @@ btr_cur_open_at_index_side(
ulint estimate; ulint estimate;
ulint savepoint; ulint savepoint;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -705,7 +705,7 @@ btr_cur_open_at_rnd_pos( ...@@ -705,7 +705,7 @@ btr_cur_open_at_rnd_pos(
ulint height; ulint height;
rec_t* node_ptr; rec_t* node_ptr;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1255,7 +1255,7 @@ btr_cur_upd_lock_and_undo( ...@@ -1255,7 +1255,7 @@ btr_cur_upd_lock_and_undo(
if (!(flags & BTR_NO_LOCKING_FLAG)) { if (!(flags & BTR_NO_LOCKING_FLAG)) {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
err = lock_clust_rec_modify_check_and_lock(flags, rec, index, err = lock_clust_rec_modify_check_and_lock(flags, rec, index,
...@@ -1431,7 +1431,7 @@ btr_cur_update_in_place( ...@@ -1431,7 +1431,7 @@ btr_cur_update_in_place(
trx_t* trx; trx_t* trx;
ibool was_delete_marked; ibool was_delete_marked;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -2071,7 +2071,7 @@ btr_cur_parse_del_mark_set_clust_rec( ...@@ -2071,7 +2071,7 @@ btr_cur_parse_del_mark_set_clust_rec(
if (!(flags & BTR_KEEP_SYS_FLAG)) { if (!(flags & BTR_KEEP_SYS_FLAG)) {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
row_upd_rec_sys_fields_in_recovery(rec, row_upd_rec_sys_fields_in_recovery(rec,
...@@ -2117,7 +2117,7 @@ btr_cur_del_mark_set_clust_rec( ...@@ -2117,7 +2117,7 @@ btr_cur_del_mark_set_clust_rec(
rec_t* rec; rec_t* rec;
trx_t* trx; trx_t* trx;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -2408,7 +2408,7 @@ btr_cur_optimistic_delete( ...@@ -2408,7 +2408,7 @@ btr_cur_optimistic_delete(
ulint max_ins_size; ulint max_ins_size;
rec_t* rec; rec_t* rec;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
ibool no_compress_needed; ibool no_compress_needed;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -2813,8 +2813,8 @@ btr_estimate_number_of_different_key_vals( ...@@ -2813,8 +2813,8 @@ btr_estimate_number_of_different_key_vals(
ulint add_on; ulint add_on;
mtr_t mtr; mtr_t mtr;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets1_[100]; ulint offsets1_[REC_OFFS_NORMAL_SIZE];
ulint offsets2_[100]; ulint offsets2_[REC_OFFS_NORMAL_SIZE];
ulint* offsets1 = offsets1_; ulint* offsets1 = offsets1_;
ulint* offsets2 = offsets2_; ulint* offsets2 = offsets2_;
*offsets1_ = (sizeof offsets1_) / sizeof *offsets1_; *offsets1_ = (sizeof offsets1_) / sizeof *offsets1_;
......
...@@ -420,7 +420,7 @@ btr_search_update_hash_ref( ...@@ -420,7 +420,7 @@ btr_search_update_hash_ref(
&& (block->curr_n_bytes == info->n_bytes) && (block->curr_n_bytes == info->n_bytes)
&& (block->curr_side == info->side)) { && (block->curr_side == info->side)) {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
rec = btr_cur_get_rec(cursor); rec = btr_cur_get_rec(cursor);
...@@ -553,7 +553,7 @@ btr_search_check_guess( ...@@ -553,7 +553,7 @@ btr_search_check_guess(
ulint bytes; ulint bytes;
int cmp; int cmp;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
ibool success = FALSE; ibool success = FALSE;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1100,7 +1100,7 @@ btr_search_build_page_hash_index( ...@@ -1100,7 +1100,7 @@ btr_search_build_page_hash_index(
rec_t** recs; rec_t** recs;
ulint i; ulint i;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1344,7 +1344,7 @@ btr_search_update_hash_on_delete( ...@@ -1344,7 +1344,7 @@ btr_search_update_hash_on_delete(
ulint fold; ulint fold;
dulint tree_id; dulint tree_id;
ibool found; ibool found;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1456,7 +1456,7 @@ btr_search_update_hash_on_insert( ...@@ -1456,7 +1456,7 @@ btr_search_update_hash_on_insert(
ulint side; ulint side;
ibool locked = FALSE; ibool locked = FALSE;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1596,7 +1596,7 @@ btr_search_validate(void) ...@@ -1596,7 +1596,7 @@ btr_search_validate(void)
ibool ok = TRUE; ibool ok = TRUE;
ulint i; ulint i;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
......
...@@ -36,6 +36,11 @@ in addition to the data and the offsets */ ...@@ -36,6 +36,11 @@ in addition to the data and the offsets */
#define REC_STATUS_INFIMUM 2 #define REC_STATUS_INFIMUM 2
#define REC_STATUS_SUPREMUM 3 #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 1/*00*/
#define REC_OFFS_SMALL_SIZE 1/*0*/
/********************************************************** /**********************************************************
The following function is used to get the offset of the The following function is used to get the offset of the
next chained record on the same page. */ next chained record on the same page. */
......
...@@ -4094,7 +4094,7 @@ lock_rec_print( ...@@ -4094,7 +4094,7 @@ lock_rec_print(
ulint i; ulint i;
mtr_t mtr; mtr_t mtr;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -4593,7 +4593,7 @@ lock_rec_validate_page( ...@@ -4593,7 +4593,7 @@ lock_rec_validate_page(
ulint i; ulint i;
mtr_t mtr; mtr_t mtr;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -4843,7 +4843,7 @@ lock_rec_insert_check_and_lock( ...@@ -4843,7 +4843,7 @@ lock_rec_insert_check_and_lock(
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
{ {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
const ulint* offsets; const ulint* offsets;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -4992,7 +4992,7 @@ lock_sec_rec_modify_check_and_lock( ...@@ -4992,7 +4992,7 @@ lock_sec_rec_modify_check_and_lock(
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
{ {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
const ulint* offsets; const ulint* offsets;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -5166,7 +5166,7 @@ lock_clust_rec_read_check_and_lock_alt( ...@@ -5166,7 +5166,7 @@ lock_clust_rec_read_check_and_lock_alt(
que_thr_t* thr) /* in: query thread */ que_thr_t* thr) /* in: query thread */
{ {
mem_heap_t* tmp_heap = NULL; mem_heap_t* tmp_heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
ulint ret; ulint ret;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
......
...@@ -59,7 +59,7 @@ page_cur_try_search_shortcut( ...@@ -59,7 +59,7 @@ page_cur_try_search_shortcut(
#endif #endif
ibool success = FALSE; ibool success = FALSE;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -231,7 +231,7 @@ page_cur_search_with_match( ...@@ -231,7 +231,7 @@ page_cur_search_with_match(
ulint dbg_matched_bytes; ulint dbg_matched_bytes;
#endif #endif
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -520,8 +520,8 @@ page_cur_insert_rec_write_log( ...@@ -520,8 +520,8 @@ page_cur_insert_rec_write_log(
{ {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint cur_offs_[100]; ulint cur_offs_[REC_OFFS_NORMAL_SIZE];
ulint ins_offs_[100]; ulint ins_offs_[REC_OFFS_NORMAL_SIZE];
ulint* cur_offs; ulint* cur_offs;
ulint* ins_offs; ulint* ins_offs;
...@@ -677,7 +677,7 @@ page_cur_parse_insert_rec( ...@@ -677,7 +677,7 @@ page_cur_parse_insert_rec(
ulint info_and_status_bits = 0; /* remove warning */ ulint info_and_status_bits = 0; /* remove warning */
page_cur_t cursor; page_cur_t cursor;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1086,7 +1086,7 @@ page_copy_rec_list_end_to_created_page( ...@@ -1086,7 +1086,7 @@ page_copy_rec_list_end_to_created_page(
ulint log_data_len; ulint log_data_len;
ibool comp = page_is_comp(page); ibool comp = page_is_comp(page);
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1276,7 +1276,7 @@ page_cur_parse_delete_rec( ...@@ -1276,7 +1276,7 @@ page_cur_parse_delete_rec(
if (page) { if (page) {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
rec_t* rec = page + offset; rec_t* rec = page + offset;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
......
...@@ -232,7 +232,7 @@ page_mem_alloc( ...@@ -232,7 +232,7 @@ page_mem_alloc(
if (rec) { if (rec) {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -467,7 +467,7 @@ page_copy_rec_list_end_no_locks( ...@@ -467,7 +467,7 @@ page_copy_rec_list_end_no_locks(
page_cur_t cur2; page_cur_t cur2;
rec_t* sup; rec_t* sup;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -568,7 +568,7 @@ page_copy_rec_list_start( ...@@ -568,7 +568,7 @@ page_copy_rec_list_start(
page_cur_t cur2; page_cur_t cur2;
rec_t* old_end; rec_t* old_end;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -750,7 +750,7 @@ page_delete_rec_list_end( ...@@ -750,7 +750,7 @@ page_delete_rec_list_end(
if ((size == ULINT_UNDEFINED) || (n_recs == ULINT_UNDEFINED)) { if ((size == ULINT_UNDEFINED) || (n_recs == ULINT_UNDEFINED)) {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
/* Calculate the sum of sizes and the number of records */ /* Calculate the sum of sizes and the number of records */
...@@ -835,7 +835,7 @@ page_delete_rec_list_start( ...@@ -835,7 +835,7 @@ page_delete_rec_list_start(
{ {
page_cur_t cur1; page_cur_t cur1;
ulint log_mode; ulint log_mode;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
byte type; byte type;
...@@ -1331,7 +1331,7 @@ page_print_list( ...@@ -1331,7 +1331,7 @@ page_print_list(
ulint count; ulint count;
ulint n_recs; ulint n_recs;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
......
...@@ -958,7 +958,7 @@ rec_convert_dtuple_to_rec( ...@@ -958,7 +958,7 @@ rec_convert_dtuple_to_rec(
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
{ {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
const ulint* offsets; const ulint* offsets;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -991,7 +991,7 @@ rec_copy_prefix_to_dtuple( ...@@ -991,7 +991,7 @@ rec_copy_prefix_to_dtuple(
ulint len; ulint len;
byte* buf = NULL; byte* buf = NULL;
ulint i; ulint i;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1407,7 +1407,7 @@ rec_print( ...@@ -1407,7 +1407,7 @@ rec_print(
return; return;
} else { } else {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
rec_print_new(file, rec, rec_get_offsets(rec, index, offsets_, rec_print_new(file, rec, rec_get_offsets(rec, index, offsets_,
......
...@@ -1134,7 +1134,7 @@ row_ins_check_foreign_constraint( ...@@ -1134,7 +1134,7 @@ row_ins_check_foreign_constraint(
mtr_t mtr; mtr_t mtr;
trx_t* trx = thr_get_trx(thr); trx_t* trx = thr_get_trx(thr);
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1559,7 +1559,7 @@ row_ins_scan_sec_index_for_duplicate( ...@@ -1559,7 +1559,7 @@ row_ins_scan_sec_index_for_duplicate(
mtr_t mtr; mtr_t mtr;
trx_t* trx; trx_t* trx;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1697,7 +1697,7 @@ row_ins_duplicate_error_in_clust( ...@@ -1697,7 +1697,7 @@ row_ins_duplicate_error_in_clust(
ulint n_unique; ulint n_unique;
trx_t* trx = thr_get_trx(thr); trx_t* trx = thr_get_trx(thr);
mem_heap_t*heap = NULL; mem_heap_t*heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1899,7 +1899,7 @@ row_ins_index_entry_low( ...@@ -1899,7 +1899,7 @@ row_ins_index_entry_low(
big_rec_t* big_rec = NULL; big_rec_t* big_rec = NULL;
mtr_t mtr; mtr_t mtr;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
......
...@@ -3673,7 +3673,7 @@ row_scan_and_check_index( ...@@ -3673,7 +3673,7 @@ row_scan_and_check_index(
ibool contains_null; ibool contains_null;
ulint i; ulint i;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
......
...@@ -101,7 +101,7 @@ row_purge_remove_clust_if_poss_low( ...@@ -101,7 +101,7 @@ row_purge_remove_clust_if_poss_low(
mtr_t mtr; mtr_t mtr;
rec_t* rec; rec_t* rec;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
index = dict_table_get_first_index(node->table); index = dict_table_get_first_index(node->table);
......
...@@ -203,7 +203,7 @@ row_build( ...@@ -203,7 +203,7 @@ row_build(
byte* buf; byte* buf;
ulint i; ulint i;
mem_heap_t* tmp_heap = NULL; mem_heap_t* tmp_heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
ut_ad(index && rec && heap); ut_ad(index && rec && heap);
...@@ -297,7 +297,7 @@ row_rec_to_index_entry( ...@@ -297,7 +297,7 @@ row_rec_to_index_entry(
ulint rec_len; ulint rec_len;
byte* buf; byte* buf;
mem_heap_t* tmp_heap = NULL; mem_heap_t* tmp_heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -379,7 +379,7 @@ row_build_row_ref( ...@@ -379,7 +379,7 @@ row_build_row_ref(
ulint clust_col_prefix_len; ulint clust_col_prefix_len;
ulint i; ulint i;
mem_heap_t* tmp_heap = NULL; mem_heap_t* tmp_heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -473,7 +473,7 @@ row_build_row_ref_in_tuple( ...@@ -473,7 +473,7 @@ row_build_row_ref_in_tuple(
ulint clust_col_prefix_len; ulint clust_col_prefix_len;
ulint i; ulint i;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
......
...@@ -79,8 +79,8 @@ row_sel_sec_rec_is_for_clust_rec( ...@@ -79,8 +79,8 @@ row_sel_sec_rec_is_for_clust_rec(
ulint i; ulint i;
dtype_t* cur_type; dtype_t* cur_type;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint clust_offsets_[100]; ulint clust_offsets_[REC_OFFS_NORMAL_SIZE];
ulint sec_offsets_[10]; ulint sec_offsets_[REC_OFFS_SMALL_SIZE];
ulint* clust_offs = clust_offsets_; ulint* clust_offs = clust_offsets_;
ulint* sec_offs = sec_offsets_; ulint* sec_offs = sec_offsets_;
ibool is_equal = TRUE; ibool is_equal = TRUE;
...@@ -626,7 +626,7 @@ row_sel_get_clust_rec( ...@@ -626,7 +626,7 @@ row_sel_get_clust_rec(
rec_t* old_vers; rec_t* old_vers;
ulint err; ulint err;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -992,7 +992,7 @@ row_sel_try_search_shortcut( ...@@ -992,7 +992,7 @@ row_sel_try_search_shortcut(
dict_index_t* index; dict_index_t* index;
rec_t* rec; rec_t* rec;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
ulint ret; ulint ret;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1118,7 +1118,7 @@ row_sel( ...@@ -1118,7 +1118,7 @@ row_sel(
ulint found_flag; ulint found_flag;
ulint err; ulint err;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -3039,7 +3039,7 @@ row_search_for_mysql( ...@@ -3039,7 +3039,7 @@ row_search_for_mysql(
ulint next_offs; ulint next_offs;
mtr_t mtr; mtr_t mtr;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
......
...@@ -152,7 +152,7 @@ row_undo_search_clust_to_pcur( ...@@ -152,7 +152,7 @@ row_undo_search_clust_to_pcur(
ibool ret; ibool ret;
rec_t* rec; rec_t* rec;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
......
...@@ -706,7 +706,7 @@ row_upd_build_sec_rec_difference_binary( ...@@ -706,7 +706,7 @@ row_upd_build_sec_rec_difference_binary(
upd_t* update; upd_t* update;
ulint n_diff; ulint n_diff;
ulint i; ulint i;
ulint offsets_[10]; ulint offsets_[REC_OFFS_SMALL_SIZE];
const ulint* offsets; const ulint* offsets;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -784,7 +784,7 @@ row_upd_build_difference_binary( ...@@ -784,7 +784,7 @@ row_upd_build_difference_binary(
ulint trx_id_pos; ulint trx_id_pos;
ibool extern_bit; ibool extern_bit;
ulint i; ulint i;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
const ulint* offsets; const ulint* offsets;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1195,7 +1195,7 @@ row_upd_store_row( ...@@ -1195,7 +1195,7 @@ row_upd_store_row(
upd_t* update; upd_t* update;
rec_t* rec; rec_t* rec;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
const ulint* offsets; const ulint* offsets;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1396,7 +1396,7 @@ row_upd_clust_rec_by_insert( ...@@ -1396,7 +1396,7 @@ row_upd_clust_rec_by_insert(
btr_cur = btr_pcur_get_btr_cur(pcur); btr_cur = btr_pcur_get_btr_cur(pcur);
if (node->state != UPD_NODE_INSERT_CLUSTERED) { if (node->state != UPD_NODE_INSERT_CLUSTERED) {
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
err = btr_cur_del_mark_set_clust_rec(BTR_NO_LOCKING_FLAG, err = btr_cur_del_mark_set_clust_rec(BTR_NO_LOCKING_FLAG,
...@@ -1537,7 +1537,7 @@ row_upd_clust_rec( ...@@ -1537,7 +1537,7 @@ row_upd_clust_rec(
if (err == DB_SUCCESS && big_rec) { if (err == DB_SUCCESS && big_rec) {
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
rec_t* rec; rec_t* rec;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1637,7 +1637,7 @@ row_upd_clust_step( ...@@ -1637,7 +1637,7 @@ row_upd_clust_step(
mtr_t mtr_buf; mtr_t mtr_buf;
rec_t* rec; rec_t* rec;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
const ulint* offsets; const ulint* offsets;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
...@@ -1995,7 +1995,7 @@ row_upd_in_place_in_select( ...@@ -1995,7 +1995,7 @@ row_upd_in_place_in_select(
btr_cur_t* btr_cur; btr_cur_t* btr_cur;
ulint err; ulint err;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
ut_ad(sel_node->select_will_do_update); ut_ad(sel_node->select_will_do_update);
......
...@@ -1016,7 +1016,7 @@ trx_undo_report_row_operation( ...@@ -1016,7 +1016,7 @@ trx_undo_report_row_operation(
trx_rseg_t* rseg; trx_rseg_t* rseg;
mtr_t mtr; mtr_t mtr;
mem_heap_t* heap = NULL; mem_heap_t* heap = NULL;
ulint offsets_[100]; ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_; ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment