summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/list_databases.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/list_databases.cpp')
-rw-r--r--src/mongo/db/commands/list_databases.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/commands/list_databases.cpp b/src/mongo/db/commands/list_databases.cpp
index 6111555e8ce..ccd34311ee1 100644
--- a/src/mongo/db/commands/list_databases.cpp
+++ b/src/mongo/db/commands/list_databases.cpp
@@ -43,6 +43,8 @@
#include "mongo/db/operation_context.h"
#include "mongo/db/service_context.h"
#include "mongo/db/storage/storage_engine.h"
+#include "mongo/db/tenant_database_name.h"
+#include "mongo/db/tenant_namespace.h"
namespace mongo {
@@ -155,7 +157,7 @@ public:
AutoGetDbForReadMaybeLockFree lockFreeReadBlock(opCtx, tenantDbName.dbName());
// The database could have been dropped since we called 'listDatabases()' above.
- if (!DatabaseHolder::get(opCtx)->dbExists(opCtx, tenantDbName.dbName())) {
+ if (!DatabaseHolder::get(opCtx)->dbExists(opCtx, tenantDbName)) {
continue;
}