summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2016-04-13 16:51:54 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2016-04-26 17:31:35 -0400
commitd6a77a0135db56972b2626a08e20a240a770f66f (patch)
tree787d6af56c956cf0fab3d12d584668f58d50d105 /src/mongo/db/commands
parentbfc1cf3a390099be0c031d2533aa5d090fc0acd6 (diff)
downloadmongo-d6a77a0135db56972b2626a08e20a240a770f66f.tar.gz
SERVER-23608 Make MatchExpressionParser take a CollatorInterface*
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r--src/mongo/db/commands/current_op.cpp3
-rw-r--r--src/mongo/db/commands/list_collections.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/commands/current_op.cpp b/src/mongo/db/commands/current_op.cpp
index fed56b550ad..2f5798b410f 100644
--- a/src/mongo/db/commands/current_op.cpp
+++ b/src/mongo/db/commands/current_op.cpp
@@ -105,7 +105,8 @@ public:
// collection, we pass in a fake collection name (and this is okay, because $where parsing
// only relies on the database part of the namespace).
const NamespaceString fakeNS(db, "$cmd");
- const Matcher matcher(filter, ExtensionsCallbackReal(txn, &fakeNS));
+ CollatorInterface* collator = nullptr;
+ const Matcher matcher(filter, ExtensionsCallbackReal(txn, &fakeNS), collator);
BSONArrayBuilder inprogBuilder(result.subarrayStart("inprog"));
diff --git a/src/mongo/db/commands/list_collections.cpp b/src/mongo/db/commands/list_collections.cpp
index 0f9876420de..a20179c2bae 100644
--- a/src/mongo/db/commands/list_collections.cpp
+++ b/src/mongo/db/commands/list_collections.cpp
@@ -191,8 +191,10 @@ public:
return appendCommandStatus(
result, Status(ErrorCodes::BadValue, "\"filter\" must be an object"));
}
+ // The collator is null because collection objects are compared using binary comparison.
+ CollatorInterface* collator = nullptr;
StatusWithMatchExpression statusWithMatcher = MatchExpressionParser::parse(
- filterElt.Obj(), ExtensionsCallbackDisallowExtensions());
+ filterElt.Obj(), ExtensionsCallbackDisallowExtensions(), collator);
if (!statusWithMatcher.isOK()) {
return appendCommandStatus(result, statusWithMatcher.getStatus());
}