summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/list_databases.cpp
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2017-09-14 16:40:46 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2017-09-29 09:30:56 -0400
commite0a505e2a8bfe59d8bdfc4e5a25aef4861d58fcf (patch)
tree237c46d1e4fd1080ac58b890485fb6197d53484c /src/mongo/db/commands/list_databases.cpp
parent026b5f6f38c883c48d063ac8ee736f7330227281 (diff)
downloadmongo-e0a505e2a8bfe59d8bdfc4e5a25aef4861d58fcf.tar.gz
SERVER-30731 MatchExpressionParser::parse() should require an ExpressionContext
Diffstat (limited to 'src/mongo/db/commands/list_databases.cpp')
-rw-r--r--src/mongo/db/commands/list_databases.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/commands/list_databases.cpp b/src/mongo/db/commands/list_databases.cpp
index 232803320d0..fb719e1bda6 100644
--- a/src/mongo/db/commands/list_databases.cpp
+++ b/src/mongo/db/commands/list_databases.cpp
@@ -99,7 +99,9 @@ public:
// The collator is null because database metadata objects are compared using simple
// binary comparison.
const CollatorInterface* collator = nullptr;
- auto statusWithMatcher = MatchExpressionParser::parse(filterElt.Obj(), collator);
+ boost::intrusive_ptr<ExpressionContext> expCtx(new ExpressionContext(opCtx, collator));
+ auto statusWithMatcher =
+ MatchExpressionParser::parse(filterElt.Obj(), std::move(expCtx));
if (!statusWithMatcher.isOK()) {
return appendCommandStatus(result, statusWithMatcher.getStatus());
}