summaryrefslogtreecommitdiff
path: root/innobase/btr/btr0sea.c
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2005-03-09 22:04:55 +0200
committerunknown <marko@hundin.mysql.fi>2005-03-09 22:04:55 +0200
commitdb32810d02ca5cae3a5619d5008923a197425e84 (patch)
tree806419ee88dc7ceffd87a90fcca8906aaa409538 /innobase/btr/btr0sea.c
parentd1b3c64b230e35dccf33ac7bb70bdd52f779536b (diff)
downloadmariadb-git-db32810d02ca5cae3a5619d5008923a197425e84.tar.gz
InnoDB: Improve performance by about 10% by removing implicit
memcpy() calls, by not initializing the offsets_[] arrays. InnoDB: Remove a Microsoft compiler warning in page0page.c. innobase/btr/btr0btr.c: Only initialize the first element of offsets_[] innobase/btr/btr0cur.c: Only initialize the first element of offsets_[] innobase/btr/btr0sea.c: Only initialize the first element of offsets_[] innobase/lock/lock0lock.c: Only initialize the first element of offsets_[] innobase/page/page0cur.c: Only initialize the first element of offsets_[] innobase/page/page0page.c: page_validate(): Silence a warning about unsigned/signed comparison. Other places: Only initialize the first element of offsets_[]. innobase/rem/rem0rec.c: Only initialize the first element of offsets_[] innobase/row/row0ins.c: Only initialize the first element of offsets_[] innobase/row/row0mysql.c: Only initialize the first element of offsets_[] innobase/row/row0purge.c: Only initialize the first element of offsets_[] innobase/row/row0row.c: Only initialize the first element of offsets_[] innobase/row/row0sel.c: Only initialize the first element of offsets_[] innobase/row/row0undo.c: Only initialize the first element of offsets_[] innobase/row/row0upd.c: Only initialize the first element of offsets_[] innobase/trx/trx0rec.c: Only initialize the first element of offsets_[]
Diffstat (limited to 'innobase/btr/btr0sea.c')
-rw-r--r--innobase/btr/btr0sea.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/innobase/btr/btr0sea.c b/innobase/btr/btr0sea.c
index dc712f650e7..5f95937a2cb 100644
--- a/innobase/btr/btr0sea.c
+++ b/innobase/btr/btr0sea.c
@@ -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_[100];
+ *offsets_ = (sizeof offsets_) / sizeof *offsets_;
rec = btr_cur_get_rec(cursor);
@@ -552,9 +553,10 @@ btr_search_check_guess(
ulint bytes;
int cmp;
mem_heap_t* heap = NULL;
- ulint offsets_[100] = { 100, };
+ ulint offsets_[100];
ulint* offsets = offsets_;
ibool success = FALSE;
+ *offsets_ = (sizeof offsets_) / sizeof *offsets_;
n_unique = dict_index_get_n_unique_in_tree(cursor->index);
@@ -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_[100];
ulint* offsets = offsets_;
+ *offsets_ = (sizeof offsets_) / sizeof *offsets_;
ut_ad(index);
@@ -1341,8 +1344,9 @@ btr_search_update_hash_on_delete(
ulint fold;
dulint tree_id;
ibool found;
- ulint offsets_[100] = { 100, };
+ ulint offsets_[100];
mem_heap_t* heap = NULL;
+ *offsets_ = (sizeof offsets_) / sizeof *offsets_;
rec = btr_cur_get_rec(cursor);
@@ -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_[100];
ulint* offsets = offsets_;
+ *offsets_ = (sizeof offsets_) / sizeof *offsets_;
table = btr_search_sys->hash_index;
@@ -1591,8 +1596,9 @@ btr_search_validate(void)
ibool ok = TRUE;
ulint i;
mem_heap_t* heap = NULL;
- ulint offsets_[100] = { 100, };
+ ulint offsets_[100];
ulint* offsets = offsets_;
+ *offsets_ = (sizeof offsets_) / sizeof *offsets_;
rw_lock_x_lock(&btr_search_latch);