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/row/row0sel.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/row/row0sel.c')
-rw-r--r-- | innobase/row/row0sel.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index 7a5e4cb9264..16e2dc69e0b 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -79,14 +79,15 @@ row_sel_sec_rec_is_for_clust_rec( ulint i; dtype_t* cur_type; mem_heap_t* heap = NULL; - ulint clust_offsets_[100] - = { 100, }; - ulint sec_offsets_[10] - = { 10, }; + ulint clust_offsets_[100]; + ulint sec_offsets_[10]; ulint* clust_offs = clust_offsets_; ulint* sec_offs = sec_offsets_; ibool is_equal = TRUE; + *clust_offsets_ = (sizeof clust_offsets_) / sizeof *clust_offsets_; + *sec_offsets_ = (sizeof sec_offsets_) / sizeof *sec_offsets_; + clust_offs = rec_get_offsets(clust_rec, clust_index, clust_offs, ULINT_UNDEFINED, &heap); sec_offs = rec_get_offsets(sec_rec, sec_index, sec_offs, @@ -625,8 +626,9 @@ row_sel_get_clust_rec( rec_t* old_vers; ulint err; mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; + ulint offsets_[100]; ulint* offsets = offsets_; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; offsets = rec_get_offsets(rec, btr_pcur_get_btr_cur(&plan->pcur)->index, @@ -990,9 +992,10 @@ row_sel_try_search_shortcut( dict_index_t* index; rec_t* rec; mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; + ulint offsets_[100]; ulint* offsets = offsets_; ulint ret; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; index = plan->index; @@ -1115,8 +1118,9 @@ row_sel( ulint found_flag; ulint err; mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; + ulint offsets_[100]; ulint* offsets = offsets_; + *offsets_ = (sizeof offsets_) / sizeof *offsets_; ut_ad(thr->run_node == node); @@ -3035,9 +3039,10 @@ row_search_for_mysql( ulint next_offs; mtr_t mtr; mem_heap_t* heap = NULL; - ulint offsets_[100] = { 100, }; + ulint offsets_[100]; ulint* offsets = offsets_; - + *offsets_ = (sizeof offsets_) / sizeof *offsets_; + ut_ad(index && pcur && search_tuple); ut_ad(trx->mysql_thread_id == os_thread_get_curr_id()); |