summaryrefslogtreecommitdiff
path: root/innobase/btr/btr0cur.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/btr/btr0cur.c')
-rw-r--r--innobase/btr/btr0cur.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/innobase/btr/btr0cur.c b/innobase/btr/btr0cur.c
index 2416149c3a8..69952c842ce 100644
--- a/innobase/btr/btr0cur.c
+++ b/innobase/btr/btr0cur.c
@@ -607,11 +607,11 @@ btr_cur_open_at_index_side(
page_cur_set_after_last(page, page_cursor);
}
- if (estimate) {
- btr_cur_add_path_info(cursor, height, root_height);
- }
-
if (height == 0) {
+ if (estimate) {
+ btr_cur_add_path_info(cursor, height,
+ root_height);
+ }
break;
}
@@ -624,6 +624,10 @@ btr_cur_open_at_index_side(
page_cur_move_to_prev(page_cursor);
}
+ if (estimate) {
+ btr_cur_add_path_info(cursor, height, root_height);
+ }
+
height--;
node_ptr = page_cur_get_rec(page_cursor);