From 23f44557852e61349fd28505ec6b953e22024d8b Mon Sep 17 00:00:00 2001 From: Nick Zolnierz Date: Fri, 30 Jun 2017 11:48:35 -0400 Subject: SERVER-29587: Partition MatchExpression types into categories, fixes an issue with previous commit where {min/max}Items was categorized as a leaf. --- src/mongo/db/commands/list_databases.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mongo/db/commands/list_databases.cpp') diff --git a/src/mongo/db/commands/list_databases.cpp b/src/mongo/db/commands/list_databases.cpp index 4b96d386577..37c0f0c0590 100644 --- a/src/mongo/db/commands/list_databases.cpp +++ b/src/mongo/db/commands/list_databases.cpp @@ -119,7 +119,9 @@ public: vector dbInfos; - bool filterNameOnly = filter && filter->isLeaf() && filter->path() == kNameField; + bool filterNameOnly = filter && + filter->getCategory() == MatchExpression::MatchCategory::kLeaf && + filter->path() == kNameField; intmax_t totalSize = 0; for (vector::iterator i = dbNames.begin(); i != dbNames.end(); ++i) { const string& dbname = *i; -- cgit v1.2.1