summaryrefslogtreecommitdiff
path: root/innobase/btr
diff options
context:
space:
mode:
authormarko@hundin.mysql.fi <>2005-03-10 15:16:16 +0200
committermarko@hundin.mysql.fi <>2005-03-10 15:16:16 +0200
commitc4ace2a471d53b1d6e3c75edd54354409f5a8757 (patch)
treeea08f06b68af52a8bab01638d9c412e1b2d239b5 /innobase/btr
parent6920a6d5466b0241286051bb327d32bf2fdfa4dc (diff)
downloadmariadb-git-c4ace2a471d53b1d6e3c75edd54354409f5a8757.tar.gz
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().
Diffstat (limited to 'innobase/btr')
-rw-r--r--innobase/btr/btr0btr.c8
-rw-r--r--innobase/btr/btr0cur.c20
-rw-r--r--innobase/btr/btr0sea.c12
3 files changed, 20 insertions, 20 deletions
diff --git a/innobase/btr/btr0btr.c b/innobase/btr/btr0btr.c
index 232d7f0f53b..1744fc36f4d 100644
--- a/innobase/btr/btr0btr.c
+++ b/innobase/btr/btr0btr.c
@@ -567,7 +567,7 @@ btr_page_get_father_for_rec(
btr_cur_t cursor;
rec_t* node_ptr;
dict_index_t* index;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
@@ -2099,7 +2099,7 @@ btr_compress(
btr_node_ptr_delete(tree, page, mtr);
} else {
mem_heap_t* heap = NULL;
- ulint offsets_[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 */
@@ -2389,7 +2389,7 @@ btr_print_tree(
mtr_t mtr;
page_t* root;
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
@@ -2491,7 +2491,7 @@ btr_index_rec_validate(
ulint i;
page_t* page;
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
diff --git a/innobase/btr/btr0cur.c b/innobase/btr/btr0cur.c
index 6279ac79d3a..e093c911f22 100644
--- a/innobase/btr/btr0cur.c
+++ b/innobase/btr/btr0cur.c
@@ -275,7 +275,7 @@ btr_cur_search_to_nth_level(
btr_search_t* info;
#endif
mem_heap_t* heap = NULL;
- ulint offsets_[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
@@ -579,7 +579,7 @@ btr_cur_open_at_index_side(
ulint estimate;
ulint savepoint;
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
@@ -705,7 +705,7 @@ btr_cur_open_at_rnd_pos(
ulint height;
rec_t* node_ptr;
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
@@ -1255,7 +1255,7 @@ btr_cur_upd_lock_and_undo(
if (!(flags & BTR_NO_LOCKING_FLAG)) {
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
err = lock_clust_rec_modify_check_and_lock(flags, rec, index,
@@ -1431,7 +1431,7 @@ btr_cur_update_in_place(
trx_t* trx;
ibool was_delete_marked;
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
@@ -2071,7 +2071,7 @@ btr_cur_parse_del_mark_set_clust_rec(
if (!(flags & BTR_KEEP_SYS_FLAG)) {
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
row_upd_rec_sys_fields_in_recovery(rec,
@@ -2117,7 +2117,7 @@ btr_cur_del_mark_set_clust_rec(
rec_t* rec;
trx_t* trx;
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
@@ -2408,7 +2408,7 @@ btr_cur_optimistic_delete(
ulint max_ins_size;
rec_t* rec;
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
ibool no_compress_needed;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
@@ -2813,8 +2813,8 @@ btr_estimate_number_of_different_key_vals(
ulint add_on;
mtr_t mtr;
mem_heap_t* heap = NULL;
- ulint offsets1_[100];
- ulint offsets2_[100];
+ ulint offsets1_[REC_OFFS_NORMAL_SIZE];
+ ulint offsets2_[REC_OFFS_NORMAL_SIZE];
ulint* offsets1 = offsets1_;
ulint* offsets2 = offsets2_;
*offsets1_ = (sizeof offsets1_) / sizeof *offsets1_;
diff --git a/innobase/btr/btr0sea.c b/innobase/btr/btr0sea.c
index 5f95937a2cb..97fdce2df75 100644
--- a/innobase/btr/btr0sea.c
+++ b/innobase/btr/btr0sea.c
@@ -420,7 +420,7 @@ 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];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
rec = btr_cur_get_rec(cursor);
@@ -553,7 +553,7 @@ btr_search_check_guess(
ulint bytes;
int cmp;
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
ibool success = FALSE;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
@@ -1100,7 +1100,7 @@ btr_search_build_page_hash_index(
rec_t** recs;
ulint i;
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
@@ -1344,7 +1344,7 @@ btr_search_update_hash_on_delete(
ulint fold;
dulint tree_id;
ibool found;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
mem_heap_t* heap = NULL;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
@@ -1456,7 +1456,7 @@ btr_search_update_hash_on_insert(
ulint side;
ibool locked = FALSE;
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;
@@ -1596,7 +1596,7 @@ btr_search_validate(void)
ibool ok = TRUE;
ulint i;
mem_heap_t* heap = NULL;
- ulint offsets_[100];
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
ulint* offsets = offsets_;
*offsets_ = (sizeof offsets_) / sizeof *offsets_;