diff options
author | Benety Goh <benety@mongodb.com> | 2013-11-15 11:58:04 -0500 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2013-11-19 10:32:19 -0500 |
commit | 31e272af4f900964997af2ce8b2e44013ea40187 (patch) | |
tree | 6890a31e4821b1ddef39230bf6dc31b6c1f0d1ee /src/mongo/db/query/interval.cpp | |
parent | 8b98dc053dae6a0db11dfb52d4a86b0274403d52 (diff) | |
download | mongo-31e272af4f900964997af2ce8b2e44013ea40187.tar.gz |
SERVER-11725 fixed interval comparison for INTERVAL_PRECEDES_COULD_UNION
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; |