summaryrefslogtreecommitdiff
path: root/storage/innobase/btr/btr0pcur.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-25 11:02:03 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-25 11:03:19 +0200
commitc3a6c683e2bba4111a69a34303af13ff9a45b46a (patch)
treed769537a9ef4b6602ce548bf4ccf037e1a78519f /storage/innobase/btr/btr0pcur.cc
parentf03f4da66373161d604b8ecf3c23ae18d08c0461 (diff)
parent72b934e3f7d5f0c717cb98b718c9529c74741b4a (diff)
downloadmariadb-git-c3a6c683e2bba4111a69a34303af13ff9a45b46a.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'storage/innobase/btr/btr0pcur.cc')
-rw-r--r--storage/innobase/btr/btr0pcur.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/storage/innobase/btr/btr0pcur.cc b/storage/innobase/btr/btr0pcur.cc
index d998ec70672..2cbc9767cb4 100644
--- a/storage/innobase/btr/btr0pcur.cc
+++ b/storage/innobase/btr/btr0pcur.cc
@@ -100,7 +100,6 @@ btr_pcur_store_position(
buf_block_t* block;
rec_t* rec;
dict_index_t* index;
- page_t* page;
ulint offs;
ut_ad(cursor->pos_state == BTR_PCUR_IS_POSITIONED);
@@ -112,9 +111,8 @@ btr_pcur_store_position(
page_cursor = btr_pcur_get_page_cur(cursor);
rec = page_cur_get_rec(page_cursor);
- page = page_align(rec);
- offs = page_offset(rec);
-
+ offs = rec - block->frame;
+ ut_ad(block->page.id.page_no() == page_get_page_no(block->frame));
ut_ad(block->page.buf_fix_count);
/* For spatial index, when we do positioning on parent
buffer if necessary, it might not hold latches, but the
@@ -129,14 +127,14 @@ btr_pcur_store_position(
cursor->old_stored = true;
- if (page_is_empty(page)) {
+ if (page_is_empty(block->frame)) {
/* It must be an empty index tree; NOTE that in this case
we do not store the modify_clock, but always do a search
if we restore the cursor position */
- ut_a(!page_has_siblings(page));
- ut_ad(page_is_leaf(page));
- ut_ad(page_get_page_no(page) == index->page);
+ ut_a(!page_has_siblings(block->frame));
+ ut_ad(page_is_leaf(block->frame));
+ ut_ad(block->page.id.page_no() == index->page);
if (page_rec_is_supremum_low(offs)) {
cursor->rel_pos = BTR_PCUR_AFTER_LAST_IN_TREE;
@@ -159,10 +157,10 @@ before_first:
rec = page_rec_get_next(rec);
if (rec_is_metadata(rec, index)) {
- ut_ad(!page_has_prev(page));
+ ut_ad(!page_has_prev(block->frame));
rec = page_rec_get_next(rec);
if (page_rec_is_supremum(rec)) {
- ut_ad(page_has_next(page));
+ ut_ad(page_has_next(block->frame));
goto before_first;
}
}