Skip to content

Commit

Permalink
fix boundaries inclusion in reverse index scan
Browse files Browse the repository at this point in the history
  • Loading branch information
andreitokar committed Jul 17, 2024
1 parent a8bce59 commit c1a9aaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions h2/src/main/org/h2/mvstore/db/MVSecondaryIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ public Cursor find(SessionLocal session, SearchRow first, SearchRow last, boolea
}

private Cursor find(SessionLocal session, SearchRow first, boolean bigger, SearchRow last, boolean reverse) {
SearchRow min = convertToKey(first, bigger);
SearchRow max = convertToKey(last, Boolean.TRUE);
SearchRow min = convertToKey(first, bigger ^ reverse);
SearchRow max = convertToKey(last, !reverse);
return new MVStoreCursor(session, getMap(session).keyIterator(min, max, reverse), mvTable);
}

Expand Down

0 comments on commit c1a9aaa

Please sign in to comment.