From d26c6b048ef280eafe971ba1c97f08eb5683f2b0 Mon Sep 17 00:00:00 2001 From: nagamocha3000 Date: Tue, 19 Jan 2021 02:00:50 +0300 Subject: [PATCH] Sort all rowIDs gathered before storing them --- fragment.go | 1 + 1 file changed, 1 insertion(+) diff --git a/fragment.go b/fragment.go index 5038646f3..522dc0128 100644 --- a/fragment.go +++ b/fragment.go @@ -3375,6 +3375,7 @@ func timeFragmentsRowIterator(fragments []*fragment, tx Tx, wrap bool, filters . allRowIDs[i] = rowID i++ } + sort.Slice(allRowIDs, func(i, j int) bool { return allRowIDs[i] < allRowIDs[j] }) it.rowIDToFragments = rowIDToFragments it.allRowIDs = allRowIDs