diff options
author | unknown <marko@hundin.mysql.fi> | 2005-03-09 22:04:55 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-03-09 22:04:55 +0200 |
commit | db32810d02ca5cae3a5619d5008923a197425e84 (patch) | |
tree | 806419ee88dc7ceffd87a90fcca8906aaa409538 /innobase/page/page0cur.c | |
parent | d1b3c64b230e35dccf33ac7bb70bdd52f779536b (diff) | |
download | mariadb-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/page/page0cur.c')
-rw-r--r-- | innobase/page/page0cur.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/innobase/page/page0cur.c b/innobase/page/page0cur.c index d083cc26069..1b0df59d57f 100644 --- a/innobase/page/page0cur.c +++ b/innobase/page/page0cur.c @@ -59,8 +59,10 @@ page_cur_try_search_shortcut( #endif ibool success = FALSE; mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; + ulint offsets_[100]; ulint* offsets = offsets_; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; + ut_ad(dtuple_check_typed(tuple)); rec = page_header_get_ptr(page, PAGE_LAST_INSERT); @@ -229,8 +231,9 @@ page_cur_search_with_match( ulint dbg_matched_bytes; #endif mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; + ulint offsets_[100]; ulint* offsets = offsets_; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; ut_ad(page && tuple && iup_matched_fields && iup_matched_bytes && ilow_matched_fields && ilow_matched_bytes && cursor); @@ -517,12 +520,15 @@ page_cur_insert_rec_write_log( { mem_heap_t* heap = NULL; - ulint cur_offs_[100] = { 100, }; - ulint ins_offs_[100] = { 100, }; + ulint cur_offs_[100]; + ulint ins_offs_[100]; ulint* cur_offs; ulint* ins_offs; + *cur_offs_ = (sizeof cur_offs_) / sizeof *cur_offs_; + *ins_offs_ = (sizeof ins_offs_) / sizeof *ins_offs_; + cur_offs = rec_get_offsets(cursor_rec, index, cur_offs_, ULINT_UNDEFINED, &heap); ins_offs = rec_get_offsets(insert_rec, index, ins_offs_, @@ -671,8 +677,9 @@ page_cur_parse_insert_rec( ulint info_and_status_bits = 0; /* remove warning */ page_cur_t cursor; mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; + ulint offsets_[100]; ulint* offsets = offsets_; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; if (!is_short) { /* Read the cursor rec offset as a 2-byte ulint */ @@ -1079,8 +1086,9 @@ page_copy_rec_list_end_to_created_page( ulint log_data_len; ibool comp = page_is_comp(page); mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; + ulint offsets_[100]; ulint* offsets = offsets_; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; ut_ad(page_dir_get_n_heap(new_page) == 2); ut_ad(page != new_page); @@ -1268,8 +1276,9 @@ page_cur_parse_delete_rec( if (page) { mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; + ulint offsets_[100]; rec_t* rec = page + offset; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; page_cur_position(rec, &cursor); |