summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r--src/mongo/dbtests/dbtests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/dbtests/dbtests.cpp b/src/mongo/dbtests/dbtests.cpp
index 4a45aabafc4..09be9e4f4d4 100644
--- a/src/mongo/dbtests/dbtests.cpp
+++ b/src/mongo/dbtests/dbtests.cpp
@@ -181,7 +181,7 @@ Status createIndexFromSpec(OperationContext* opCtx, StringData ns, const BSONObj
WriteContextForTests::WriteContextForTests(OperationContext* opCtx, StringData ns)
: _opCtx(opCtx), _nss(ns) {
// Lock the database and collection
- _autoDb.emplace(opCtx, DatabaseName{_nss.db()}, MODE_IX);
+ _autoDb.emplace(opCtx, _nss.dbName(), MODE_IX);
_collLock.emplace(opCtx, _nss, MODE_IX);
const bool doShardVersionCheck = false;