summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2014-05-01 15:08:31 -0400
committerDan Pasette <dan@mongodb.com>2014-05-24 20:07:00 -0400
commit93dda51140446d51c5be01aafd2cc8fecb7eff31 (patch)
tree980dd1772681263b230e80d96ab3a75cd3f0ca7a
parent28f06d9343c06e7f2ac46e98bf264f5f9aab8b7f (diff)
downloadmongo-93dda51140446d51c5be01aafd2cc8fecb7eff31.tar.gz
SERVER-13587 ndeleted in system.profile documents reports 1 too few documents removed
(cherry picked from commit 6c2cfda2d60f0fda51bb389449b7defff9704b73)
-rw-r--r--src/mongo/db/commands/write_commands/batch_executor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/commands/write_commands/batch_executor.cpp b/src/mongo/db/commands/write_commands/batch_executor.cpp
index 1d86f1e87d0..42290171676 100644
--- a/src/mongo/db/commands/write_commands/batch_executor.cpp
+++ b/src/mongo/db/commands/write_commands/batch_executor.cpp
@@ -512,11 +512,13 @@ namespace mongo {
currentOp->setQuery( currWrite.getUpdate()->getQuery() );
currentOp->debug().query = currWrite.getUpdate()->getQuery();
currentOp->debug().updateobj = currWrite.getUpdate()->getUpdateExpr();
+ // Note: debug().nMatched, nModified and nmoved are set internally in update
}
else {
dassert( currWrite.getOpType() == BatchedCommandRequest::BatchType_Delete );
currentOp->setQuery( currWrite.getDelete()->getQuery() );
currentOp->debug().query = currWrite.getDelete()->getQuery();
+ currentOp->debug().ndeleted = 0;
}
return currentOp.release();