summaryrefslogtreecommitdiff
path: root/storage/innobase/gis/gis0sea.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/gis/gis0sea.cc')
-rw-r--r--storage/innobase/gis/gis0sea.cc56
1 files changed, 28 insertions, 28 deletions
diff --git a/storage/innobase/gis/gis0sea.cc b/storage/innobase/gis/gis0sea.cc
index 97163cae410..87ebd9ad34a 100644
--- a/storage/innobase/gis/gis0sea.cc
+++ b/storage/innobase/gis/gis0sea.cc
@@ -533,7 +533,7 @@ rtr_compare_cursor_rec(
rec = btr_cur_get_rec(cursor);
offsets = rec_get_offsets(
- rec, index, NULL, ULINT_UNDEFINED, heap);
+ rec, index, NULL, false, ULINT_UNDEFINED, heap);
return(btr_node_ptr_get_child_page_no(rec, offsets) == page_no);
}
@@ -723,7 +723,7 @@ rtr_page_get_father_node_ptr(
user_rec = btr_cur_get_rec(cursor);
ut_a(page_rec_is_user_rec(user_rec));
- offsets = rec_get_offsets(user_rec, index, offsets,
+ offsets = rec_get_offsets(user_rec, index, offsets, !level,
ULINT_UNDEFINED, &heap);
rtr_get_mbr_from_rec(user_rec, offsets, &mbr);
@@ -740,7 +740,7 @@ rtr_page_get_father_node_ptr(
node_ptr = btr_cur_get_rec(cursor);
ut_ad(!page_rec_is_comp(node_ptr)
|| rec_get_status(node_ptr) == REC_STATUS_NODE_PTR);
- offsets = rec_get_offsets(node_ptr, index, offsets,
+ offsets = rec_get_offsets(node_ptr, index, offsets, false,
ULINT_UNDEFINED, &heap);
ulint child_page = btr_node_ptr_get_child_page_no(node_ptr, offsets);
@@ -757,13 +757,14 @@ rtr_page_get_father_node_ptr(
print_rec = page_rec_get_next(
page_get_infimum_rec(page_align(user_rec)));
- offsets = rec_get_offsets(print_rec, index,
- offsets, ULINT_UNDEFINED, &heap);
+ offsets = rec_get_offsets(print_rec, index, offsets,
+ page_rec_is_leaf(user_rec),
+ ULINT_UNDEFINED, &heap);
error << "; child ";
rec_print(error.m_oss, print_rec,
rec_get_info_bits(print_rec, rec_offs_comp(offsets)),
offsets);
- offsets = rec_get_offsets(node_ptr, index, offsets,
+ offsets = rec_get_offsets(node_ptr, index, offsets, false,
ULINT_UNDEFINED, &heap);
error << "; parent ";
rec_print(error.m_oss, print_rec,
@@ -1310,10 +1311,10 @@ rtr_cur_restore_position(
heap = mem_heap_create(256);
offsets1 = rec_get_offsets(
- r_cursor->old_rec, index, NULL,
+ r_cursor->old_rec, index, NULL, !level,
r_cursor->old_n_fields, &heap);
offsets2 = rec_get_offsets(
- rec, index, NULL,
+ rec, index, NULL, !level,
r_cursor->old_n_fields, &heap);
comp = rec_offs_comp(offsets1);
@@ -1351,7 +1352,7 @@ rtr_cur_restore_position(
heap = mem_heap_create(256);
- tuple = dict_index_build_data_tuple(index, r_cursor->old_rec,
+ tuple = dict_index_build_data_tuple(r_cursor->old_rec, index, !level,
r_cursor->old_n_fields, heap);
page_cursor = btr_pcur_get_page_cur(r_cursor);
@@ -1383,10 +1384,10 @@ search_again:
rec = btr_pcur_get_rec(r_cursor);
offsets1 = rec_get_offsets(
- r_cursor->old_rec, index, NULL,
+ r_cursor->old_rec, index, NULL, !level,
r_cursor->old_n_fields, &heap);
offsets2 = rec_get_offsets(
- rec, index, NULL,
+ rec, index, NULL, !level,
r_cursor->old_n_fields, &heap);
comp = rec_offs_comp(offsets1);
@@ -1433,6 +1434,7 @@ rtr_leaf_push_match_rec(
rtr_rec_t rtr_rec;
buf = match_rec->block.frame + match_rec->used;
+ ut_ad(page_rec_is_leaf(rec));
copy = rec_copy(buf, rec, offsets);
@@ -1661,11 +1663,9 @@ rtr_cur_search_with_match(
ulint* offsets = offsets_;
mem_heap_t* heap = NULL;
int cmp = 1;
- bool is_leaf;
double least_inc = DBL_MAX;
const rec_t* best_rec;
const rec_t* last_match_rec = NULL;
- ulint level;
bool match_init = false;
ulint space = block->page.id.space();
page_cur_mode_t orig_mode = mode;
@@ -1679,8 +1679,8 @@ rtr_cur_search_with_match(
page = buf_block_get_frame(block);
- is_leaf = page_is_leaf(page);
- level = btr_page_get_level(page, mtr);
+ const ulint level = btr_page_get_level(page, mtr);
+ const bool is_leaf = !level;
if (mode == PAGE_CUR_RTREE_LOCATE) {
ut_ad(level != 0);
@@ -1702,7 +1702,7 @@ rtr_cur_search_with_match(
ulint new_rec_size = rec_get_converted_size(index, tuple, 0);
- offsets = rec_get_offsets(rec, index, offsets,
+ offsets = rec_get_offsets(rec, index, offsets, is_leaf,
dtuple_get_n_fields_cmp(tuple),
&heap);
@@ -1723,7 +1723,7 @@ rtr_cur_search_with_match(
}
while (!page_rec_is_supremum(rec)) {
- offsets = rec_get_offsets(rec, index, offsets,
+ offsets = rec_get_offsets(rec, index, offsets, is_leaf,
dtuple_get_n_fields_cmp(tuple),
&heap);
if (!is_leaf) {
@@ -1818,7 +1818,7 @@ rtr_cur_search_with_match(
== PAGE_CUR_RTREE_GET_FATHER);
offsets = rec_get_offsets(
- rec, index, offsets,
+ rec, index, offsets, false,
ULINT_UNDEFINED, &heap);
page_no = btr_node_ptr_get_child_page_no(
@@ -1867,7 +1867,7 @@ rtr_cur_search_with_match(
/* Collect matched records on page */
offsets = rec_get_offsets(
- rec, index, offsets,
+ rec, index, offsets, true,
ULINT_UNDEFINED, &heap);
rtr_leaf_push_match_rec(
rec, rtr_info, offsets,
@@ -1899,9 +1899,8 @@ rtr_cur_search_with_match(
ulint child_no;
ut_ad(least_inc < DBL_MAX);
offsets = rec_get_offsets(
- best_rec, index,
- offsets, ULINT_UNDEFINED,
- &heap);
+ best_rec, index, offsets,
+ false, ULINT_UNDEFINED, &heap);
child_no =
btr_node_ptr_get_child_page_no(
best_rec, offsets);
@@ -1953,12 +1952,12 @@ rtr_cur_search_with_match(
/* Verify the record to be positioned is the same
as the last record in matched_rec vector */
offsets2 = rec_get_offsets(test_rec.r_rec, index,
- offsets2, ULINT_UNDEFINED,
- &heap);
+ offsets2, true,
+ ULINT_UNDEFINED, &heap);
offsets = rec_get_offsets(last_match_rec, index,
- offsets, ULINT_UNDEFINED,
- &heap);
+ offsets, true,
+ ULINT_UNDEFINED, &heap);
ut_ad(cmp_rec_rec(test_rec.r_rec, last_match_rec,
offsets2, offsets, index) == 0);
@@ -1975,7 +1974,8 @@ rtr_cur_search_with_match(
ut_ad(!last_match_rec && rec);
offsets = rec_get_offsets(
- rec, index, offsets, ULINT_UNDEFINED, &heap);
+ rec, index, offsets, false,
+ ULINT_UNDEFINED, &heap);
child_no = btr_node_ptr_get_child_page_no(rec, offsets);
@@ -1997,7 +1997,7 @@ rtr_cur_search_with_match(
&& mode != PAGE_CUR_RTREE_INSERT) {
ulint page_no;
- offsets = rec_get_offsets(rec, index, offsets,
+ offsets = rec_get_offsets(rec, index, offsets, false,
ULINT_UNDEFINED, &heap);
page_no = btr_node_ptr_get_child_page_no(rec, offsets);