summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/plan_ranking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/dbtests/plan_ranking.cpp')
-rw-r--r--src/mongo/dbtests/plan_ranking.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mongo/dbtests/plan_ranking.cpp b/src/mongo/dbtests/plan_ranking.cpp
index af13d03fb61..9e965b270c3 100644
--- a/src/mongo/dbtests/plan_ranking.cpp
+++ b/src/mongo/dbtests/plan_ranking.cpp
@@ -34,6 +34,7 @@
#include "mongo/platform/basic.h"
#include <iostream>
+#include <memory>
#include "mongo/client/dbclient_cursor.h"
#include "mongo/db/catalog/collection.h"
@@ -51,7 +52,6 @@
#include "mongo/db/query/query_planner_test_lib.h"
#include "mongo/db/query/stage_builder.h"
#include "mongo/dbtests/dbtests.h"
-#include "mongo/stdx/memory.h"
namespace mongo {
@@ -197,7 +197,7 @@ public:
// Run the query {a:4, b:1}.
{
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(BSON("a" << 100 << "b" << 1));
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr));
verify(statusWithCQ.isOK());
@@ -216,7 +216,7 @@ public:
// And run the same query again.
{
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(BSON("a" << 100 << "b" << 1));
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr));
verify(statusWithCQ.isOK());
@@ -251,7 +251,7 @@ public:
addIndex(BSON("b" << 1));
// Run the query {a:1, b:{$gt:1}.
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(BSON("a" << 1 << "b" << BSON("$gt" << 1)));
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr));
verify(statusWithCQ.isOK());
@@ -291,7 +291,7 @@ public:
addIndex(BSON("a" << 1 << "b" << 1));
// Query for a==27 with projection that wants 'a' and 'b'.
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(BSON("a" << 27));
qr->setProj(BSON("_id" << 0 << "a" << 1 << "b" << 1));
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr));
@@ -326,7 +326,7 @@ public:
addIndex(BSON("b" << 1));
// There is no data that matches this query but we don't know that until EOF.
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(BSON("a" << 1 << "b" << 1 << "c" << 99));
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr));
ASSERT_OK(statusWithCQ.getStatus());
@@ -363,7 +363,7 @@ public:
// There is no data that matches this query ({a:2}). Both scans will hit EOF before
// returning any data.
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(BSON("a" << 2));
qr->setProj(BSON("_id" << 0 << "a" << 1 << "b" << 1));
@@ -398,7 +398,7 @@ public:
addIndex(BSON("b" << 1));
// Run the query {a:N+1, b:1}. (No such document.)
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(BSON("a" << N + 1 << "b" << 1));
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr));
verify(statusWithCQ.isOK());
@@ -434,7 +434,7 @@ public:
addIndex(BSON("b" << 1));
// Run the query {a:N+1, b:1}. (No such document.)
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(BSON("a" << BSON("$gte" << N + 1) << "b" << 1));
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr));
verify(statusWithCQ.isOK());
@@ -463,7 +463,7 @@ public:
// Run a query with a sort. The blocking sort won't produce any data during the
// evaluation period.
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(BSON("_id" << BSON("$gte" << 20 << "$lte" << 200)));
qr->setSort(BSON("c" << 1));
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr));
@@ -493,7 +493,7 @@ public:
}
// Look for A Space Odyssey.
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(BSON("foo" << 2001));
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr));
verify(statusWithCQ.isOK());
@@ -526,7 +526,7 @@ public:
addIndex(BSON("d" << 1 << "e" << 1));
// Query: find({a: 1}).sort({d: 1})
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(BSON("a" << 1));
qr->setSort(BSON("d" << 1));
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr));
@@ -564,7 +564,7 @@ public:
// Solutions using either 'a' or 'b' will take a long time to start producing
// results. However, an index scan on 'b' will start producing results sooner
// than an index scan on 'a'.
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(fromjson("{a: 1, b: 1, c: {$gte: 5000}}"));
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr));
ASSERT_OK(statusWithCQ.getStatus());
@@ -596,7 +596,7 @@ public:
addIndex(BSON("b" << 1 << "c" << 1));
addIndex(BSON("a" << 1));
- auto qr = stdx::make_unique<QueryRequest>(nss);
+ auto qr = std::make_unique<QueryRequest>(nss);
qr->setFilter(fromjson("{a: 9, b: {$ne: 10}, c: 9}"));
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(qr));
ASSERT_OK(statusWithCQ.getStatus());