summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2020-08-05 15:42:25 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-06 01:41:30 +0000
commite90324a09559eb3398c7c2b3360088e69496c3fd (patch)
tree65f09c99f306e344528a8aca541901dfda510c17 /src/mongo/db/matcher
parentf67a91df05719630d7893140dbb3a5edd45a642b (diff)
downloadmongo-e90324a09559eb3398c7c2b3360088e69496c3fd.tar.gz
Revert "SERVER-49117 Remove storage validation of '$' and '.' in field names for insert and update"
This reverts commit f1194464424569250152308e3cae1ecbade7fb71.
Diffstat (limited to 'src/mongo/db/matcher')
-rw-r--r--src/mongo/db/matcher/expression_parser.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/matcher/expression_parser.cpp b/src/mongo/db/matcher/expression_parser.cpp
index 1ef996ffed0..c4013697ebe 100644
--- a/src/mongo/db/matcher/expression_parser.cpp
+++ b/src/mongo/db/matcher/expression_parser.cpp
@@ -66,7 +66,6 @@
#include "mongo/db/matcher/schema/expression_internal_schema_xor.h"
#include "mongo/db/matcher/schema/json_schema_parser.h"
#include "mongo/db/namespace_string.h"
-#include "mongo/db/query/dbref.h"
#include "mongo/db/query/query_knobs_gen.h"
#include "mongo/util/str.h"
#include "mongo/util/string_map.h"
@@ -215,15 +214,15 @@ bool isDBRefDocument(const BSONObj& obj, bool allowIncompleteDBRef) {
auto element = i.next();
auto fieldName = element.fieldNameStringData();
// $ref
- if (!hasRef && dbref::kRefFieldName == fieldName) {
+ if (!hasRef && "$ref"_sd == fieldName) {
hasRef = true;
}
// $id
- else if (!hasID && dbref::kIdFieldName == fieldName) {
+ else if (!hasID && "$id"_sd == fieldName) {
hasID = true;
}
// $db
- else if (!hasDB && dbref::kDbFieldName == fieldName) {
+ else if (!hasDB && "$db"_sd == fieldName) {
hasDB = true;
}
}