diff options
author | James Wahlin <james@mongodb.com> | 2019-01-30 16:33:34 -0500 |
---|---|---|
committer | James Wahlin <james@mongodb.com> | 2019-01-31 12:30:43 -0500 |
commit | a2c0f15d6dc9fcda389b18b54287c4fcb5be44cd (patch) | |
tree | 625a847873e1003ef297dc0dd8ac97f48cfeebfb /src/mongo/db/matcher | |
parent | 01d84b2565fc9ea9626a55dcf1f3f817968088f2 (diff) | |
download | mongo-a2c0f15d6dc9fcda389b18b54287c4fcb5be44cd.tar.gz |
SERVER-13779 Allow $not to be applied to $regex
Diffstat (limited to 'src/mongo/db/matcher')
-rw-r--r-- | src/mongo/db/matcher/expression_parser.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/mongo/db/matcher/expression_parser.cpp b/src/mongo/db/matcher/expression_parser.cpp index 8a055626399..e75fa98d8e0 100644 --- a/src/mongo/db/matcher/expression_parser.cpp +++ b/src/mongo/db/matcher/expression_parser.cpp @@ -1372,12 +1372,6 @@ StatusWithMatchExpression parseNot(StringData name, return parseStatus; } - for (size_t i = 0; i < theAnd->numChildren(); i++) { - if (theAnd->getChild(i)->matchType() == MatchExpression::REGEX) { - return {ErrorCodes::BadValue, "$not cannot have a regex"}; - } - } - return {stdx::make_unique<NotMatchExpression>(theAnd.release())}; } |