summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2003-01-18 15:16:26 +0200
committerheikki@hundin.mysql.fi <>2003-01-18 15:16:26 +0200
commit375fcfa5805d837dca51a11186500d935fb25a75 (patch)
treea10de6d81aec545ddbce929e7295530cfa9d1315 /innobase
parent91ba1345125e6463476ddb9eeedefe7a6220949c (diff)
downloadmariadb-git-375fcfa5805d837dca51a11186500d935fb25a75.tar.gz
btr0sea.c:
Backport from 4.0: fix bug in adaptive hash index search
Diffstat (limited to 'innobase')
-rw-r--r--innobase/btr/btr0sea.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/innobase/btr/btr0sea.c b/innobase/btr/btr0sea.c
index 421aafba1c5..fd65a98cc0f 100644
--- a/innobase/btr/btr0sea.c
+++ b/innobase/btr/btr0sea.c
@@ -470,6 +470,7 @@ btr_search_check_guess(
/*===================*/
/* out: TRUE if success */
btr_cur_t* cursor, /* in: guessed cursor position */
+ ibool can_only_compare_to_cursor_rec,
dtuple_t* tuple, /* in: data tuple */
ulint mode, /* in: PAGE_CUR_L, PAGE_CUR_LE, PAGE_CUR_G,
or PAGE_CUR_GE */
@@ -528,6 +529,10 @@ btr_search_check_guess(
}
}
+ if (can_only_compare_to_cursor_rec) {
+ return(FALSE);
+ }
+
match = 0;
bytes = 0;
@@ -632,6 +637,7 @@ btr_search_guess_on_hash(
ulint fold;
ulint tuple_n_fields;
dulint tree_id;
+ ibool can_only_compare_to_cursor_rec = TRUE;
#ifdef notdefined
btr_cur_t cursor2;
btr_pcur_t pcur;
@@ -706,6 +712,8 @@ btr_search_guess_on_hash(
goto failure;
}
+ can_only_compare_to_cursor_rec = FALSE;
+
buf_page_dbg_add_level(page, SYNC_TREE_NODE_FROM_HASH);
}
@@ -737,7 +745,9 @@ btr_search_guess_on_hash(
fold);
*/
} else {
- success = btr_search_check_guess(cursor, tuple, mode, mtr);
+ success = btr_search_check_guess(cursor,
+ can_only_compare_to_cursor_rec,
+ tuple, mode, mtr);
}
if (!success) {