From beaeaa196e8b1d3e36dfccd55cfded8ddf95a205 Mon Sep 17 00:00:00 2001 From: Siyuan Zhou Date: Tue, 27 Jun 2017 15:03:43 -0400 Subject: Revert "SERVER-29587: Create $_internalSchemaMinItems and $_internalSchemaMaxItems MatchExpressions" This reverts commit a92eb118cc8500a9c4286e8ef28cb26ea3f4e238. --- src/mongo/db/matcher/expression_leaf.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/matcher/expression_leaf.cpp') diff --git a/src/mongo/db/matcher/expression_leaf.cpp b/src/mongo/db/matcher/expression_leaf.cpp index d1d9ad08567..4980986f9d4 100644 --- a/src/mongo/db/matcher/expression_leaf.cpp +++ b/src/mongo/db/matcher/expression_leaf.cpp @@ -39,7 +39,6 @@ #include "mongo/config.h" #include "mongo/db/field_ref.h" #include "mongo/db/jsobj.h" -#include "mongo/db/matcher/expression_parser.h" #include "mongo/db/matcher/path.h" #include "mongo/db/query/collation/collator_interface.h" #include "mongo/stdx/memory.h" @@ -656,6 +655,9 @@ Status InMatchExpression::addRegex(std::unique_ptr expr) { // ----------- +const double BitTestMatchExpression::kLongLongMaxPlusOneAsDouble = + scalbn(1, std::numeric_limits::digits); + Status BitTestMatchExpression::init(StringData path, std::vector bitPositions) { _bitPositions = std::move(bitPositions); @@ -794,7 +796,7 @@ bool BitTestMatchExpression::matchesSingleElement(const BSONElement& e) const { // integer are treated as 0. We use 'kLongLongMaxAsDouble' because if we just did // eDouble > 2^63-1, it would be compared against 2^63. eDouble=2^63 would not get caught // that way. - if (eDouble >= MatchExpressionParser::kLongLongMaxPlusOneAsDouble || + if (eDouble >= kLongLongMaxPlusOneAsDouble || eDouble < std::numeric_limits::min()) { return false; } -- cgit v1.2.1