summaryrefslogtreecommitdiff
path: root/storage/innobase/btr/btr0btr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/btr/btr0btr.cc')
-rw-r--r--storage/innobase/btr/btr0btr.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc
index adea4fa384b..9998fe52fc4 100644
--- a/storage/innobase/btr/btr0btr.cc
+++ b/storage/innobase/btr/btr0btr.cc
@@ -2240,7 +2240,8 @@ btr_page_insert_fits(
rec = page_rec_get_next(page_get_infimum_rec(page));
end_rec = page_rec_get_next(btr_cur_get_rec(cursor));
- } else if (cmp_dtuple_rec(tuple, split_rec, *offsets) >= 0) {
+ } else if (cmp_dtuple_rec(tuple, split_rec, cursor->index,
+ *offsets) >= 0) {
rec = page_rec_get_next(page_get_infimum_rec(page));
end_rec = split_rec;
@@ -2526,7 +2527,7 @@ btr_page_tuple_smaller(
? cursor->index->n_core_fields : 0,
n_uniq, heap);
- return(cmp_dtuple_rec(tuple, first_rec, *offsets) < 0);
+ return cmp_dtuple_rec(tuple, first_rec, cursor->index, *offsets) < 0;
}
/** Insert the tuple into the right sibling page, if the cursor is at the end
@@ -2816,7 +2817,8 @@ func_start:
n_uniq, heap);
insert_left = !tuple
- || cmp_dtuple_rec(tuple, split_rec, *offsets) < 0;
+ || cmp_dtuple_rec(tuple, split_rec, cursor->index,
+ *offsets) < 0;
if (!insert_left && new_page_zip && n_iterations > 0) {
/* If a compressed page has already been split,
@@ -4245,7 +4247,8 @@ btr_check_node_ptr(
tuple, btr_cur_get_rec(&cursor),
PAGE_CUR_WITHIN));
} else {
- ut_a(!cmp_dtuple_rec(tuple, btr_cur_get_rec(&cursor), offsets));
+ ut_a(!cmp_dtuple_rec(tuple, btr_cur_get_rec(&cursor), index,
+ offsets));
}
func_exit:
mem_heap_free(heap);
@@ -4743,7 +4746,7 @@ loop:
/* For spatial index, we cannot guarantee the key ordering
across pages, so skip the record compare verification for
now. Will enhanced in special R-Tree index validation scheme */
- if (!dict_index_is_spatial(index)
+ if (index->is_btree()
&& cmp_rec_rec(rec, right_rec,
offsets, offsets2, index) >= 0) {
@@ -4778,9 +4781,7 @@ loop:
in parent level and linked pages in the child level.
2) Search parent from root is very costly for R-tree.
We will add special validation mechanism for R-tree later (WL #7520) */
- if (!dict_index_is_spatial(index)
- && block->page.id().page_no() != dict_index_get_page(index)) {
-
+ if (index->is_btree() && block->page.id().page_no() != index->page) {
/* Check father node pointers */
rec_t* node_ptr;
@@ -4837,7 +4838,7 @@ loop:
page_rec_get_next(page_get_infimum_rec(page)),
0, heap, btr_page_get_level(page));
- if (cmp_dtuple_rec(node_ptr_tuple, node_ptr,
+ if (cmp_dtuple_rec(node_ptr_tuple, node_ptr, index,
offsets)) {
const rec_t* first_rec = page_rec_get_next(
page_get_infimum_rec(page));