summaryrefslogtreecommitdiff
path: root/src/mongo/db/views
diff options
context:
space:
mode:
authorAnton Korshunov <anton.korshunov@mongodb.com>2019-10-17 13:03:40 +0000
committerevergreen <evergreen@mongodb.com>2019-10-17 13:03:40 +0000
commitf8ede369fbf02fd7d16befc85c8740798fc2e2bf (patch)
tree087ccb1ed8b4fcbc912ce02472eb5795ac13717c /src/mongo/db/views
parentabe90fb2090ead3fdbf9f62d5db50c88eb31d527 (diff)
downloadmongo-f8ede369fbf02fd7d16befc85c8740798fc2e2bf.tar.gz
SERVER-42462 Put new $meta arguments behind FCV check
Diffstat (limited to 'src/mongo/db/views')
-rw-r--r--src/mongo/db/views/view_catalog.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/views/view_catalog.cpp b/src/mongo/db/views/view_catalog.cpp
index 86e1eb7dd2e..5fce7a5119f 100644
--- a/src/mongo/db/views/view_catalog.cpp
+++ b/src/mongo/db/views/view_catalog.cpp
@@ -332,6 +332,11 @@ StatusWith<stdx::unordered_set<NamespaceString>> ViewCatalog::_validatePipeline(
currentFCV != ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo44) {
expCtx->maxFeatureCompatibilityVersion = currentFCV;
}
+
+ // The pipeline parser needs to know that we're parsing a pipeline for a view definition
+ // to apply some additional checks.
+ expCtx->isParsingViewDefinition = true;
+
auto pipelineStatus = Pipeline::parse(viewDef.pipeline(), std::move(expCtx));
if (!pipelineStatus.isOK()) {
return pipelineStatus.getStatus();