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/lock/lock0lock.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/lock/lock0lock.c')
-rw-r--r-- | innobase/lock/lock0lock.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c index a2560c1faae..66a746111e8 100644 --- a/innobase/lock/lock0lock.c +++ b/innobase/lock/lock0lock.c @@ -4094,8 +4094,9 @@ lock_rec_print( ulint i; mtr_t mtr; mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; + ulint offsets_[100]; ulint* offsets = offsets_; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; #ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); @@ -4592,8 +4593,9 @@ lock_rec_validate_page( ulint i; mtr_t mtr; mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; + ulint offsets_[100]; ulint* offsets = offsets_; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; #ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); @@ -4841,9 +4843,11 @@ lock_rec_insert_check_and_lock( #ifdef UNIV_DEBUG { mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; - const ulint* offsets = rec_get_offsets( - next_rec, index, offsets_, + ulint offsets_[100]; + const ulint* offsets; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; + + offsets = rec_get_offsets(next_rec, index, offsets_, ULINT_UNDEFINED, &heap); ut_ad(lock_rec_queue_validate(next_rec, index, offsets)); if (heap) { @@ -4988,9 +4992,12 @@ lock_sec_rec_modify_check_and_lock( #ifdef UNIV_DEBUG { mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; - const ulint* offsets = rec_get_offsets( - rec, index, offsets_, ULINT_UNDEFINED, &heap); + ulint offsets_[100]; + const ulint* offsets; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; + + offsets = rec_get_offsets(rec, index, offsets_, + ULINT_UNDEFINED, &heap); ut_ad(lock_rec_queue_validate(rec, index, offsets)); if (heap) { mem_heap_free(heap); @@ -5159,9 +5166,10 @@ lock_clust_rec_read_check_and_lock_alt( que_thr_t* thr) /* in: query thread */ { mem_heap_t* tmp_heap = NULL; - ulint offsets_[100] = { 100, }; + ulint offsets_[100]; ulint* offsets = offsets_; ulint ret; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &tmp_heap); |