diff options
Diffstat (limited to 'src/mongo/db/commands/dbcommands_d.cpp')
-rw-r--r-- | src/mongo/db/commands/dbcommands_d.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/commands/dbcommands_d.cpp b/src/mongo/db/commands/dbcommands_d.cpp index 7c715eeacb4..5151c566467 100644 --- a/src/mongo/db/commands/dbcommands_d.cpp +++ b/src/mongo/db/commands/dbcommands_d.cpp @@ -132,7 +132,8 @@ protected: if (!db) { // When setting the profiling level, create the database if it didn't already exist. // When just reading the profiling level, we do not create the database. - db = DatabaseHolder::getDatabaseHolder().openDb(opCtx, dbName); + auto databaseHolder = DatabaseHolder::get(opCtx); + db = databaseHolder->openDb(opCtx, dbName); } uassertStatusOK(db->setProfilingLevel(opCtx, profilingLevel)); } |