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/rem | |
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/rem')
-rw-r--r-- | innobase/rem/rem0rec.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/innobase/rem/rem0rec.c b/innobase/rem/rem0rec.c index 904f91b8945..94b2c692897 100644 --- a/innobase/rem/rem0rec.c +++ b/innobase/rem/rem0rec.c @@ -958,9 +958,11 @@ rec_convert_dtuple_to_rec( #ifdef UNIV_DEBUG { mem_heap_t* heap = NULL; - ulint offsets_[100 + REC_OFFS_HEADER_SIZE] - = { 100, }; - const ulint* offsets = rec_get_offsets(rec, index, + ulint offsets_[100]; + const ulint* offsets; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; + + offsets = rec_get_offsets(rec, index, offsets_, ULINT_UNDEFINED, &heap); ut_ad(rec_validate(rec, offsets)); if (heap) { @@ -989,9 +991,9 @@ rec_copy_prefix_to_dtuple( ulint len; byte* buf = NULL; ulint i; - ulint offsets_[100 + REC_OFFS_HEADER_SIZE] - = { 100, }; + ulint offsets_[100]; ulint* offsets = offsets_; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; offsets = rec_get_offsets(rec, index, offsets, n_fields, &heap); @@ -1405,8 +1407,9 @@ rec_print( return; } else { mem_heap_t* heap = NULL; - ulint offsets_[100 + REC_OFFS_HEADER_SIZE] - = { 100, }; + ulint offsets_[100]; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; + rec_print_new(file, rec, rec_get_offsets(rec, index, offsets_, ULINT_UNDEFINED, &heap)); if (heap) { |