summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/mr_common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/mr_common.cpp')
-rw-r--r--src/mongo/db/commands/mr_common.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/commands/mr_common.cpp b/src/mongo/db/commands/mr_common.cpp
index e1595bea415..68ce716f0f5 100644
--- a/src/mongo/db/commands/mr_common.cpp
+++ b/src/mongo/db/commands/mr_common.cpp
@@ -68,7 +68,7 @@ using namespace std::string_literals;
auto translateSort(boost::intrusive_ptr<ExpressionContext> expCtx,
const BSONObj& sort,
const boost::optional<std::int64_t>& limit) {
- return DocumentSourceSort::create(expCtx, sort, limit.get_value_or(-1));
+ return DocumentSourceSort::create(expCtx, sort, limit.get_value_or(0));
}
auto translateMap(boost::intrusive_ptr<ExpressionContext> expCtx, std::string code) {