summaryrefslogtreecommitdiff
path: root/innobase/lock
diff options
context:
space:
mode:
authormarko@hundin.mysql.fi <>2005-03-09 22:04:55 +0200
committermarko@hundin.mysql.fi <>2005-03-09 22:04:55 +0200
commit6920a6d5466b0241286051bb327d32bf2fdfa4dc (patch)
tree806419ee88dc7ceffd87a90fcca8906aaa409538 /innobase/lock
parent79573a5ee8ab6a2fb2151207a69a9577130ac212 (diff)
downloadmariadb-git-6920a6d5466b0241286051bb327d32bf2fdfa4dc.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.
Diffstat (limited to 'innobase/lock')
-rw-r--r--innobase/lock/lock0lock.c26
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);