Commit 07e88be5 authored by Allen Lai's avatar Allen Lai Committed by Marko Mäkelä

Bug#23044098 INSERT OF GIS DATA INTO RTREE HITS ASSERT IN RTR_CUR_RESTORE_POSITION_FUNC()

This bug is caused by missing page number field when store btree cursor.

Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com>
RB: 14617
parent 4e41ac26
This diff is collapsed.
This diff is collapsed.
......@@ -1652,6 +1652,7 @@ rec_copy_prefix_to_buf(
ulint prefix_len;
ulint null_mask;
ulint status;
bool is_rtr_node_ptr = false;
UNIV_PREFETCH_RW(*buf);
......@@ -1673,6 +1674,7 @@ rec_copy_prefix_to_buf(
/* For R-tree, we need to copy the child page number field. */
if (dict_index_is_spatial(index)) {
ut_ad(n_fields == DICT_INDEX_SPATIAL_NODEPTR_SIZE + 1);
is_rtr_node_ptr = true;
} else {
/* it doesn't make sense to copy the child page number
field */
......@@ -1717,7 +1719,11 @@ rec_copy_prefix_to_buf(
null_mask <<= 1;
}
if (field->fixed_len) {
if (is_rtr_node_ptr && i == 1) {
/* For rtree node ptr rec, we need to
copy the page no field with 4 bytes len. */
prefix_len += 4;
} else if (field->fixed_len) {
prefix_len += field->fixed_len;
} else {
ulint len = *lens--;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment