Details
Description
The CanonicalQuery is deleted when statusWithCQ goes out of scope in QueryPlannerTest::runInvalidQueryFull(). This was introduced by the changes from SERVER-16889.
void QueryPlannerTest::runInvalidQueryFull(const BSONObj& query, |
const BSONObj& sort, |
const BSONObj& proj, |
long long skip, |
long long limit, |
const BSONObj& hint, |
const BSONObj& minObj, |
const BSONObj& maxObj, |
bool snapshot) { |
solns.clear();
|
|
auto statusWithCQ = CanonicalQuery::canonicalize(nss,
|
query,
|
sort,
|
proj,
|
skip,
|
limit,
|
hint,
|
minObj,
|
maxObj,
|
snapshot,
|
false, // explain |
ExtensionsCallbackNoop());
|
ASSERT_OK(statusWithCQ.getStatus());
|
|
Status s = QueryPlanner::plan(*statusWithCQ.getValue(), params, &solns.mutableVector());
|
ASSERT_NOT_OK(s);
|
}
|