diff options
Diffstat (limited to 'src/mongo/db/query/query_settings.cpp')
-rw-r--r-- | src/mongo/db/query/query_settings.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/query/query_settings.cpp b/src/mongo/db/query/query_settings.cpp index 9499e62a8ae..b5b5aa95473 100644 --- a/src/mongo/db/query/query_settings.cpp +++ b/src/mongo/db/query/query_settings.cpp @@ -39,7 +39,8 @@ namespace mongo { AllowedIndicesFilter::AllowedIndicesFilter(const BSONObjSet& indexKeyPatterns, const std::unordered_set<std::string>& indexNames) - : indexNames(indexNames) { + : indexKeyPatterns(SimpleBSONObjComparator::kInstance.makeBSONObjSet()), + indexNames(indexNames) { for (BSONObjSet::const_iterator i = indexKeyPatterns.begin(); i != indexKeyPatterns.end(); ++i) { const BSONObj& indexKeyPattern = *i; @@ -61,6 +62,7 @@ AllowedIndexEntry::AllowedIndexEntry(const BSONObj& query, sort(sort.getOwned()), projection(projection.getOwned()), collation(collation.getOwned()), + indexKeyPatterns(SimpleBSONObjComparator::kInstance.makeBSONObjSet()), indexNames(indexNames) { for (BSONObjSet::const_iterator i = indexKeyPatterns.begin(); i != indexKeyPatterns.end(); ++i) { |