diff options
author | unknown <marko@hundin.mysql.fi> | 2005-06-30 11:15:06 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-06-30 11:15:06 +0300 |
commit | 384a0c0a0f7391b3e243f6811acd19acd6e2d006 (patch) | |
tree | c43c957b05d9e40e028b9b900926a61082fac239 /innobase/btr | |
parent | 14ade13553492ea84e8e187134fe4cd76a44f5b3 (diff) | |
download | mariadb-git-384a0c0a0f7391b3e243f6811acd19acd6e2d006.tar.gz |
InnoDB: Optimize page_cur_search_with_match().
innobase/btr/btr0cur.c:
Disable the mode PAGE_CUR_LE_OR_EXTENDS at compile-time
innobase/include/page0cur.h:
Disable the mode PAGE_CUR_LE_OR_EXTENDS at compile-time
Do not define PAGE_CUR_DBG unless #ifdef UNIV_SEARCH_DEBUG
innobase/page/page0cur.c:
Disable the mode PAGE_CUR_LE_OR_EXTENDS at compile-time
Disable PAGE_CUR_DBG unless #ifdef UNIV_SEARCH_DEBUG
page_cur_try_search_shortcut(): Optimize the predicates
(compare the result of page_cmp_dtuple_rec_with_match() against 0,
use page_rec_is_supremum()).
page_cur_search_with_match(): Compare the result of
cmp_dtuple_rec_with_match() against zero, add UNIV_LIKELY hints,
replace duplicated code with gotos.
Diffstat (limited to 'innobase/btr')
-rw-r--r-- | innobase/btr/btr0cur.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/innobase/btr/btr0cur.c b/innobase/btr/btr0cur.c index 30e85e021bc..d76b139c3c8 100644 --- a/innobase/btr/btr0cur.c +++ b/innobase/btr/btr0cur.c @@ -316,7 +316,9 @@ btr_cur_search_to_nth_level( if (btr_search_latch.writer == RW_LOCK_NOT_LOCKED && latch_mode <= BTR_MODIFY_LEAF && info->last_hash_succ && !estimate +#ifdef PAGE_CUR_LE_OR_EXTENDS && mode != PAGE_CUR_LE_OR_EXTENDS +#endif /* PAGE_CUR_LE_OR_EXTENDS */ && srv_use_adaptive_hash_indexes && btr_search_guess_on_hash(index, info, tuple, mode, latch_mode, cursor, @@ -391,8 +393,10 @@ btr_cur_search_to_nth_level( break; default: ut_ad(mode == PAGE_CUR_L - || mode == PAGE_CUR_LE - || mode == PAGE_CUR_LE_OR_EXTENDS); +#ifdef PAGE_CUR_LE_OR_EXTENDS + || mode == PAGE_CUR_LE_OR_EXTENDS +#endif /* PAGE_CUR_LE_OR_EXTENDS */ + || mode == PAGE_CUR_LE); page_mode = mode; break; } |