@@ -520,7 +520,7 @@ convertIndexToKey(RumDataLeafItemIndex *src, RumKey *dst)
520
520
}
521
521
}
522
522
523
- /**
523
+ /*
524
524
* Find item pointer in leaf data page. Returns true if given item pointer is
525
525
* found and false if it's not. Sets offset and iptrOut to last item pointer
526
526
* which is less than given one. Sets ptrOut ahead that item pointer.
@@ -874,6 +874,13 @@ dataPlaceToPage(RumBtree btree, Page page, OffsetNumber off)
874
874
copyPtr = pageCopy + (ptr - page );
875
875
copyItem .iptr = iptr ;
876
876
}
877
+ else
878
+ {
879
+ /*
880
+ * Force insertion of new items until insertion items are less than
881
+ * right bound.
882
+ */
883
+ }
877
884
878
885
freespace = RumPageGetOpaque (page )-> freespace ;
879
886
@@ -907,7 +914,7 @@ dataPlaceToPage(RumBtree btree, Page page, OffsetNumber off)
907
914
{
908
915
/* we copied all old items but we have to add more new items */
909
916
if (stopAppend )
910
- /* there is no free space on page */
917
+ /* there is no free space on page */
911
918
break ;
912
919
else if (RumPageRightMost (page ))
913
920
/* force insertion of new item */
@@ -916,7 +923,13 @@ dataPlaceToPage(RumBtree btree, Page page, OffsetNumber off)
916
923
RumDataPageGetRightBound (page ),
917
924
btree -> items + btree -> curitem )) >= 0 )
918
925
{
919
- /* force insertion of new item */
926
+ /*
927
+ * Force insertion if current item is greater than last item
928
+ * of the page but less than right bound.
929
+ */
930
+ if (off > maxoff )
931
+ /* force insertion of new item */
932
+ cmp = 1 ;
920
933
}
921
934
else
922
935
/* new items should be inserted on next page */
0 commit comments