summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/query_stage_cached_plan.cpp
diff options
context:
space:
mode:
authorQingyang Chen <qingyang.chen@10gen.com>2015-06-22 13:22:45 -0400
committerQingyang Chen <qingyang.chen@10gen.com>2015-06-22 13:22:45 -0400
commit22cf042f9541cf778f71e1bd1a84fcd87012c0b1 (patch)
tree0d293b08d819409580f7087654b5d6f81d5d40a4 /src/mongo/dbtests/query_stage_cached_plan.cpp
parent3f6f66daac840fe2b2dc26eeeacbf015479567df (diff)
downloadmongo-22cf042f9541cf778f71e1bd1a84fcd87012c0b1.tar.gz
Revert "SERVER-16889 query subsystem CanonicalQuery::canonicalize use StatusWith<unique_ptr> for ownership transfer"
This reverts commit 3f6f66daac840fe2b2dc26eeeacbf015479567df.
Diffstat (limited to 'src/mongo/dbtests/query_stage_cached_plan.cpp')
-rw-r--r--src/mongo/dbtests/query_stage_cached_plan.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/dbtests/query_stage_cached_plan.cpp b/src/mongo/dbtests/query_stage_cached_plan.cpp
index a0b7fd14b4a..821a329e91d 100644
--- a/src/mongo/dbtests/query_stage_cached_plan.cpp
+++ b/src/mongo/dbtests/query_stage_cached_plan.cpp
@@ -116,9 +116,9 @@ public:
ASSERT(collection);
// Query can be answered by either index on "a" or index on "b".
- auto statusWithCQ = CanonicalQuery::canonicalize(ns(), fromjson("{a: {$gte: 8}, b: 1}"));
- ASSERT_OK(statusWithCQ.getStatus());
- const std::unique_ptr<CanonicalQuery> cq = std::move(statusWithCQ.getValue());
+ CanonicalQuery* rawCq;
+ ASSERT_OK(CanonicalQuery::canonicalize(ns(), fromjson("{a: {$gte: 8}, b: 1}"), &rawCq));
+ const std::unique_ptr<CanonicalQuery> cq(rawCq);
// We shouldn't have anything in the plan cache for this shape yet.
PlanCache* cache = collection->infoCache()->getPlanCache();
@@ -180,9 +180,9 @@ public:
ASSERT(collection);
// Query can be answered by either index on "a" or index on "b".
- auto statusWithCQ = CanonicalQuery::canonicalize(ns(), fromjson("{a: {$gte: 8}, b: 1}"));
- ASSERT_OK(statusWithCQ.getStatus());
- const std::unique_ptr<CanonicalQuery> cq = std::move(statusWithCQ.getValue());
+ CanonicalQuery* rawCq;
+ ASSERT_OK(CanonicalQuery::canonicalize(ns(), fromjson("{a: {$gte: 8}, b: 1}"), &rawCq));
+ const std::unique_ptr<CanonicalQuery> cq(rawCq);
// We shouldn't have anything in the plan cache for this shape yet.
PlanCache* cache = collection->infoCache()->getPlanCache();