diff options
author | Mathias Stearn <mathias@10gen.com> | 2012-10-18 17:21:45 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2012-11-05 13:03:26 -0500 |
commit | d8384a53036b471099b8d293ac21b7bd4809df33 (patch) | |
tree | d56927c99d605bcb6ea6fdff4ca81e267b4b11f9 /src/mongo/db/pipeline/document_source_limit.cpp | |
parent | d5390644810ab9a79146b62a02e46f2854cc340b (diff) | |
download | mongo-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.cpp | 5 |
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) { } |