summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/database_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/catalog/database_impl.cpp')
-rw-r--r--src/mongo/db/catalog/database_impl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/catalog/database_impl.cpp b/src/mongo/db/catalog/database_impl.cpp
index 5e092f5d5b1..c46c8f76235 100644
--- a/src/mongo/db/catalog/database_impl.cpp
+++ b/src/mongo/db/catalog/database_impl.cpp
@@ -369,6 +369,8 @@ void DatabaseImpl::getStats(OperationContext* opCtx,
return true;
});
+ // Make sure that the same fields are returned for non-existing dbs
+ // in `DBStats::errmsgRun`
output->appendNumber("collections", nCollections);
output->appendNumber("views", nViews);
output->appendNumber("objects", objects);