-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Labels:
-
Fully Compatible
-
ALL
-
Query 2018-01-01, Query 2018-01-15
Test always evaluates the same
Defect 102259 (STATIC_C)
Checker DEADCODE (subcategory redundant_test)
File: /src/mongo/db/pipeline/document_source_sort.cpp
Function mongo::DocumentSourceSort::doOptimizeAt(std::List_iterator<boost::intrusive_ptr<mongo::DocumentSource>>, std::_cxx11::list<boost::intrusive_ptr<mongo::DocumentSource>, std::allocator<boost::intrusive_ptr<mongo::DocumentSource>>> *)
/src/mongo/db/pipeline/document_source_sort.cpp, line: 206
At condition "nextSkip", the value of "nextSkip" must be "NULL".
} else if (!nextStage->constraints().canSwapWithLimit && !nextSkip) {
/src/mongo/db/pipeline/document_source_sort.cpp, line: 197
Condition "nextSkip", taking false branch. Now the value of "nextSkip" is "NULL".
if (auto nextSkip = dynamic_cast<DocumentSourceSkip*>(nextStage)) {
/src/mongo/db/pipeline/document_source_sort.cpp, line: 206
The condition "!nextSkip" must be true.
} else if (!nextStage->constraints().canSwapWithLimit && !nextSkip) {