summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbcommands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/dbcommands.cpp')
-rw-r--r--src/mongo/db/dbcommands.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp
index 3b02c054866..61906bcb1e9 100644
--- a/src/mongo/db/dbcommands.cpp
+++ b/src/mongo/db/dbcommands.cpp
@@ -462,7 +462,6 @@ namespace mongo {
}
Lock::DBLock dbXLock(txn->lockState(), dbname, MODE_X);
- WriteUnitOfWork wunit(txn);
Client::Context ctx(txn, nsToDrop);
Database* db = ctx.db();
@@ -480,6 +479,7 @@ namespace mongo {
result.append( "ns", nsToDrop );
result.append( "nIndexesWas", numIndexes );
+ WriteUnitOfWork wunit(txn);
Status s = db->dropCollection( txn, nsToDrop );
if ( !s.isOK() ) {