-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
Fully Compatible
-
ALL
This line of code is supposed to set the error code on a count operation when we fail to construct a plan executor for the count. However, it sets the error code using the Status from parsing the command request instead of the Status from retrieving a PlanExecutor. This could cause failed count operations to report the wrong error code.
This issue only affects count commands which run through the DBDirectClient.
Original Description
A new defect has been detected and assigned to david.storch in Coverity Connect.
http://coverity.mongodb.com//sourcebrowser.htm?projectId=10001#mergedDefectId=32048
The defect was flagged by checker COPY_PASTE_ERROR in
file /src/mongo/db/commands/count.cpp
function mongo::runCount(mongo::OperationContext *, const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, const mongo::BSONObj &, std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int &)
and this ticket was created by asya