diff options
Diffstat (limited to 'src/mongo/db/query/interval.cpp')
-rw-r--r-- | src/mongo/db/query/interval.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/query/interval.cpp b/src/mongo/db/query/interval.cpp index 6c80632c4a5..49b75d0c250 100644 --- a/src/mongo/db/query/interval.cpp +++ b/src/mongo/db/query/interval.cpp @@ -150,7 +150,9 @@ namespace mongo { // if (precedes(*this, other)) { - if (0 == end.woCompare(other.start, false)) { + // It's not possible for both endInclusive and other.startInclusive to be true because + // the bounds would intersect. Refer to section on "Intersect cases" above. + if ((endInclusive || other.startInclusive) && 0 == end.woCompare(other.start, false)) { return INTERVAL_PRECEDES_COULD_UNION; } return INTERVAL_PRECEDES; |