summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_limit.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2012-10-18 17:21:45 -0400
committerMathias Stearn <mathias@10gen.com>2012-11-05 13:03:26 -0500
commitd8384a53036b471099b8d293ac21b7bd4809df33 (patch)
treed56927c99d605bcb6ea6fdff4ca81e267b4b11f9 /src/mongo/db/pipeline/document_source_limit.cpp
parentd5390644810ab9a79146b62a02e46f2854cc340b (diff)
downloadmongo-d8384a53036b471099b8d293ac21b7bd4809df33.tar.gz
SERVER-7408 Correctly handle $skip and $limit in sharded agg
This bug only comes up if the first $skip or $limit precedes the first $sort or $limit. This is very rare, but should still be handled correctly.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_limit.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_limit.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/pipeline/document_source_limit.cpp b/src/mongo/db/pipeline/document_source_limit.cpp
index 422fceb5e98..999d80f0368 100644
--- a/src/mongo/db/pipeline/document_source_limit.cpp
+++ b/src/mongo/db/pipeline/document_source_limit.cpp
@@ -27,9 +27,8 @@
namespace mongo {
const char DocumentSourceLimit::limitName[] = "$limit";
- DocumentSourceLimit::DocumentSourceLimit(
- const intrusive_ptr<ExpressionContext> &pExpCtx):
- DocumentSource(pExpCtx),
+ DocumentSourceLimit::DocumentSourceLimit(const intrusive_ptr<ExpressionContext> &pExpCtx):
+ SplittableDocumentSource(pExpCtx),
limit(0),
count(0) {
}