summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/count.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/count.cpp')
-rw-r--r--src/mongo/db/commands/count.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/commands/count.cpp b/src/mongo/db/commands/count.cpp
index f68f7488785..306af80f311 100644
--- a/src/mongo/db/commands/count.cpp
+++ b/src/mongo/db/commands/count.cpp
@@ -113,6 +113,8 @@ namespace mongo {
}
try {
+ ScopedExecutorRegistration safety(exec.get());
+
long long count = 0;
Runner::RunnerState state;
while (Runner::RUNNER_ADVANCED == (state = exec->getNext(NULL, NULL))) {