diff options
author | Anton Korshunov <anton.korshunov@mongodb.com> | 2019-10-17 13:03:40 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-17 13:03:40 +0000 |
commit | f8ede369fbf02fd7d16befc85c8740798fc2e2bf (patch) | |
tree | 087ccb1ed8b4fcbc912ce02472eb5795ac13717c /src/mongo/db/views | |
parent | abe90fb2090ead3fdbf9f62d5db50c88eb31d527 (diff) | |
download | mongo-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.cpp | 5 |
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(); |