summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r--src/mongo/db/commands/authentication_commands.cpp3
-rw-r--r--src/mongo/db/commands/collection_to_capped.cpp3
-rw-r--r--src/mongo/db/commands/count_cmd.cpp7
-rw-r--r--src/mongo/db/commands/dbhash.cpp3
-rw-r--r--src/mongo/db/commands/geo_near_cmd.cpp5
-rw-r--r--src/mongo/db/commands/group.cpp7
-rw-r--r--src/mongo/db/commands/index_filter_commands.cpp9
-rw-r--r--src/mongo/db/commands/index_filter_commands_test.cpp9
-rw-r--r--src/mongo/db/commands/list_collections.cpp5
-rw-r--r--src/mongo/db/commands/mr.cpp15
-rw-r--r--src/mongo/db/commands/mr.h11
-rw-r--r--src/mongo/db/commands/pipeline_command.cpp5
-rw-r--r--src/mongo/db/commands/plan_cache_commands.cpp11
-rw-r--r--src/mongo/db/commands/plan_cache_commands_test.cpp15
-rw-r--r--src/mongo/db/commands/test_commands.cpp2
-rw-r--r--src/mongo/db/commands/write_commands/batch_executor.cpp7
-rw-r--r--src/mongo/db/commands/write_commands/batch_executor.h3
-rw-r--r--src/mongo/db/commands/write_commands/write_commands.cpp4
18 files changed, 54 insertions, 70 deletions
diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp
index 6ebe3f06da8..1e2dc0a2439 100644
--- a/src/mongo/db/commands/authentication_commands.cpp
+++ b/src/mongo/db/commands/authentication_commands.cpp
@@ -33,7 +33,6 @@
#include "mongo/db/commands/authentication_commands.h"
#include <boost/algorithm/string.hpp>
-#include <boost/scoped_ptr.hpp>
#include <string>
#include <vector>
@@ -136,7 +135,7 @@ namespace mongo {
}
SimpleMutex _randMutex; // Synchronizes accesses to _random.
- boost::scoped_ptr<SecureRandom> _random;
+ std::unique_ptr<SecureRandom> _random;
} cmdGetNonce;
void CmdAuthenticate::redactForLogging(mutablebson::Document* cmdObj) {
diff --git a/src/mongo/db/commands/collection_to_capped.cpp b/src/mongo/db/commands/collection_to_capped.cpp
index 2ee13ed04ca..c9d3816a2b7 100644
--- a/src/mongo/db/commands/collection_to_capped.cpp
+++ b/src/mongo/db/commands/collection_to_capped.cpp
@@ -30,7 +30,6 @@
#include "mongo/platform/basic.h"
-#include <boost/scoped_ptr.hpp>
#include "mongo/db/background.h"
#include "mongo/db/catalog/capped_utils.h"
@@ -47,7 +46,7 @@
namespace mongo {
- using boost::scoped_ptr;
+ using std::unique_ptr;
using std::string;
using std::stringstream;
diff --git a/src/mongo/db/commands/count_cmd.cpp b/src/mongo/db/commands/count_cmd.cpp
index 452bf8209b8..00d5b4ac731 100644
--- a/src/mongo/db/commands/count_cmd.cpp
+++ b/src/mongo/db/commands/count_cmd.cpp
@@ -30,7 +30,6 @@
#include "mongo/platform/basic.h"
-#include <boost/scoped_ptr.hpp>
#include "mongo/db/commands.h"
#include "mongo/db/curop.h"
@@ -45,7 +44,7 @@
namespace mongo {
namespace {
- using boost::scoped_ptr;
+ using std::unique_ptr;
using std::string;
using std::stringstream;
@@ -103,7 +102,7 @@ namespace {
return getExecStatus;
}
- scoped_ptr<PlanExecutor> exec(rawExec);
+ unique_ptr<PlanExecutor> exec(rawExec);
Explain::explainStages(exec.get(), verbosity, out);
return Status::OK();
@@ -139,7 +138,7 @@ namespace {
return appendCommandStatus(result, getExecStatus);
}
- scoped_ptr<PlanExecutor> exec(rawExec);
+ unique_ptr<PlanExecutor> exec(rawExec);
// Store the plan summary string in CurOp.
if (NULL != CurOp::get(txn)) {
diff --git a/src/mongo/db/commands/dbhash.cpp b/src/mongo/db/commands/dbhash.cpp
index e96fb4b6288..f7cd6330366 100644
--- a/src/mongo/db/commands/dbhash.cpp
+++ b/src/mongo/db/commands/dbhash.cpp
@@ -32,7 +32,6 @@
#include "mongo/db/commands/dbhash.h"
-#include <boost/scoped_ptr.hpp>
#include "mongo/db/catalog/collection.h"
#include "mongo/db/catalog/database.h"
@@ -47,7 +46,7 @@
namespace mongo {
- using boost::scoped_ptr;
+ using std::unique_ptr;
using std::unique_ptr;
using std::list;
using std::endl;
diff --git a/src/mongo/db/commands/geo_near_cmd.cpp b/src/mongo/db/commands/geo_near_cmd.cpp
index 42c608cb2d6..6f44749925d 100644
--- a/src/mongo/db/commands/geo_near_cmd.cpp
+++ b/src/mongo/db/commands/geo_near_cmd.cpp
@@ -28,7 +28,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kCommand
-#include <boost/scoped_ptr.hpp>
#include <vector>
#include "mongo/db/auth/action_set.h"
@@ -54,7 +53,7 @@
namespace mongo {
- using boost::scoped_ptr;
+ using std::unique_ptr;
using std::stringstream;
class Geo2dFindNearCmd : public Command {
@@ -202,7 +201,7 @@ namespace mongo {
return false;
}
- scoped_ptr<PlanExecutor> exec(rawExec);
+ unique_ptr<PlanExecutor> exec(rawExec);
double totalDistance = 0;
BSONObjBuilder resultBuilder(result.subarrayStart("results"));
diff --git a/src/mongo/db/commands/group.cpp b/src/mongo/db/commands/group.cpp
index adfb6fae37f..31a03fa2543 100644
--- a/src/mongo/db/commands/group.cpp
+++ b/src/mongo/db/commands/group.cpp
@@ -30,7 +30,6 @@
#include "mongo/db/commands/group.h"
-#include <boost/scoped_ptr.hpp>
#include "mongo/db/auth/action_set.h"
#include "mongo/db/auth/action_type.h"
@@ -45,7 +44,7 @@
namespace mongo {
- using boost::scoped_ptr;
+ using std::unique_ptr;
using std::string;
static GroupCommand cmdGroup;
@@ -152,7 +151,7 @@ namespace mongo {
return appendCommandStatus(out, getExecStatus);
}
- scoped_ptr<PlanExecutor> planExecutor(rawPlanExecutor);
+ unique_ptr<PlanExecutor> planExecutor(rawPlanExecutor);
// Group executors return ADVANCED exactly once, with the entire group result.
BSONObj retval;
@@ -211,7 +210,7 @@ namespace mongo {
return getExecStatus;
}
- scoped_ptr<PlanExecutor> planExecutor(rawPlanExecutor);
+ unique_ptr<PlanExecutor> planExecutor(rawPlanExecutor);
Explain::explainStages(planExecutor.get(), verbosity, out);
return Status::OK();
diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp
index 17d932cffb5..ac85733d3b5 100644
--- a/src/mongo/db/commands/index_filter_commands.cpp
+++ b/src/mongo/db/commands/index_filter_commands.cpp
@@ -28,7 +28,6 @@
#include "mongo/platform/basic.h"
-#include <boost/scoped_ptr.hpp>
#include <string>
#include <sstream>
@@ -120,7 +119,7 @@ namespace mongo {
using std::string;
using std::stringstream;
using std::vector;
- using boost::scoped_ptr;
+ using std::unique_ptr;
IndexFilterCommand::IndexFilterCommand(const string& name, const string& helpText)
: Command(name),
@@ -274,7 +273,7 @@ namespace mongo {
return status;
}
- scoped_ptr<CanonicalQuery> cq(cqRaw);
+ unique_ptr<CanonicalQuery> cq(cqRaw);
querySettings->removeAllowedIndices(planCache->computeKey(*cq));
// Remove entry from plan cache
@@ -320,7 +319,7 @@ namespace mongo {
Status result = CanonicalQuery::canonicalize(
ns, entry->query, entry->sort, entry->projection, &cqRaw, whereCallback);
invariant(result.isOK());
- scoped_ptr<CanonicalQuery> cq(cqRaw);
+ unique_ptr<CanonicalQuery> cq(cqRaw);
// Remove plan cache entry.
planCache->remove(*cq);
@@ -388,7 +387,7 @@ namespace mongo {
if (!status.isOK()) {
return status;
}
- scoped_ptr<CanonicalQuery> cq(cqRaw);
+ unique_ptr<CanonicalQuery> cq(cqRaw);
// Add allowed indices to query settings, overriding any previous entries.
querySettings->setAllowedIndices(*cq, planCache->computeKey(*cq), indexes);
diff --git a/src/mongo/db/commands/index_filter_commands_test.cpp b/src/mongo/db/commands/index_filter_commands_test.cpp
index a1781f2b5bd..baeb4b985a7 100644
--- a/src/mongo/db/commands/index_filter_commands_test.cpp
+++ b/src/mongo/db/commands/index_filter_commands_test.cpp
@@ -32,7 +32,6 @@
#include "mongo/db/commands/index_filter_commands.h"
-#include <boost/scoped_ptr.hpp>
#include "mongo/db/json.h"
#include "mongo/db/operation_context_noop.h"
@@ -44,7 +43,7 @@ using namespace mongo;
namespace {
- using boost::scoped_ptr;
+ using std::unique_ptr;
using std::unique_ptr;
using std::string;
using std::vector;
@@ -121,7 +120,7 @@ namespace {
// Create canonical query.
CanonicalQuery* cqRaw;
ASSERT_OK(CanonicalQuery::canonicalize(ns, queryObj, sortObj, projectionObj, &cqRaw));
- scoped_ptr<CanonicalQuery> cq(cqRaw);
+ unique_ptr<CanonicalQuery> cq(cqRaw);
QuerySolution qs;
qs.cacheData.reset(new SolutionCacheData());
@@ -143,7 +142,7 @@ namespace {
// Create canonical query.
CanonicalQuery* cqRaw;
ASSERT_OK(CanonicalQuery::canonicalize(ns, queryObj, sortObj, projectionObj, &cqRaw));
- scoped_ptr<CanonicalQuery> cq(cqRaw);
+ unique_ptr<CanonicalQuery> cq(cqRaw);
// Retrieve cache entries from plan cache.
vector<PlanCacheEntry*> entries = planCache.getAllEntries();
@@ -157,7 +156,7 @@ namespace {
// Alternatively, we could add key to PlanCacheEntry but that would be used in one place only.
ASSERT_OK(CanonicalQuery::canonicalize(ns, entry->query, entry->sort,
entry->projection, &cqRaw));
- scoped_ptr<CanonicalQuery> currentQuery(cqRaw);
+ unique_ptr<CanonicalQuery> currentQuery(cqRaw);
if (planCache.computeKey(*currentQuery) == planCache.computeKey(*cq)) {
found = true;
diff --git a/src/mongo/db/commands/list_collections.cpp b/src/mongo/db/commands/list_collections.cpp
index a9fd6daea3b..9c4789e3cd3 100644
--- a/src/mongo/db/commands/list_collections.cpp
+++ b/src/mongo/db/commands/list_collections.cpp
@@ -30,7 +30,6 @@
#include "mongo/platform/basic.h"
-#include <boost/scoped_ptr.hpp>
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/catalog/collection_catalog_entry.h"
@@ -49,7 +48,7 @@
namespace mongo {
- using boost::scoped_ptr;
+ using std::unique_ptr;
using std::list;
using std::string;
using std::stringstream;
@@ -93,7 +92,7 @@ namespace mongo {
int,
string& errmsg,
BSONObjBuilder& result) {
- boost::scoped_ptr<MatchExpression> matcher;
+ std::unique_ptr<MatchExpression> matcher;
BSONElement filterElt = jsobj["filter"];
if (!filterElt.eoo()) {
if (filterElt.type() != mongo::Object) {
diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp
index 099be62e3bc..4551380d44a 100644
--- a/src/mongo/db/commands/mr.cpp
+++ b/src/mongo/db/commands/mr.cpp
@@ -32,7 +32,6 @@
#include "mongo/db/commands/mr.h"
-#include <boost/scoped_ptr.hpp>
#include "mongo/client/connpool.h"
#include "mongo/client/parallel.h"
@@ -72,7 +71,7 @@
namespace mongo {
- using boost::scoped_ptr;
+ using std::unique_ptr;
using boost::shared_ptr;
using std::unique_ptr;
using std::endl;
@@ -205,7 +204,7 @@ namespace mongo {
// need to build the reduce args: ( key, [values] )
BSONObjBuilder reduceArgs( sizeEstimate );
- boost::scoped_ptr<BSONArrayBuilder> valueBuilder;
+ std::unique_ptr<BSONArrayBuilder> valueBuilder;
unsigned n = 0;
for ( ; n<tuples.size(); n++ ) {
BSONObjIterator j(tuples[n]);
@@ -1025,7 +1024,7 @@ namespace mongo {
wuow.commit();
}
- scoped_ptr<AutoGetCollectionForRead> ctx(new AutoGetCollectionForRead(_txn, _config.incLong));
+ unique_ptr<AutoGetCollectionForRead> ctx(new AutoGetCollectionForRead(_txn, _config.incLong));
BSONObj prev;
BSONList all;
@@ -1061,7 +1060,7 @@ namespace mongo {
&rawExec,
QueryPlannerParams::NO_TABLE_SCAN).isOK());
- scoped_ptr<PlanExecutor> exec(rawExec);
+ unique_ptr<PlanExecutor> exec(rawExec);
// iterate over all sorted objects
BSONObj o;
@@ -1400,9 +1399,9 @@ namespace mongo {
const NamespaceString nss(config.ns);
// Need lock and context to use it
- scoped_ptr<ScopedTransaction> scopedXact(
+ unique_ptr<ScopedTransaction> scopedXact(
new ScopedTransaction(txn, MODE_IS));
- scoped_ptr<AutoGetDb> scopedAutoDb(new AutoGetDb(txn, nss.db(), MODE_S));
+ unique_ptr<AutoGetDb> scopedAutoDb(new AutoGetDb(txn, nss.db(), MODE_S));
const WhereCallbackReal whereCallback(txn, nss.db());
@@ -1433,7 +1432,7 @@ namespace mongo {
return 0;
}
- scoped_ptr<PlanExecutor> exec(rawExec);
+ unique_ptr<PlanExecutor> exec(rawExec);
Timer mt;
diff --git a/src/mongo/db/commands/mr.h b/src/mongo/db/commands/mr.h
index 79a6980b03e..b36e36b29b9 100644
--- a/src/mongo/db/commands/mr.h
+++ b/src/mongo/db/commands/mr.h
@@ -31,7 +31,6 @@
#pragma once
#include <boost/noncopyable.hpp>
-#include <boost/scoped_ptr.hpp>
#include <string>
#include <vector>
@@ -193,9 +192,9 @@ namespace mongo {
// functions
- boost::scoped_ptr<Mapper> mapper;
- boost::scoped_ptr<Reducer> reducer;
- boost::scoped_ptr<Finalizer> finalizer;
+ std::unique_ptr<Mapper> mapper;
+ std::unique_ptr<Reducer> reducer;
+ std::unique_ptr<Finalizer> finalizer;
BSONObj mapParams;
BSONObj scopeSetup;
@@ -352,10 +351,10 @@ namespace mongo {
int _add(InMemory* im , const BSONObj& a);
OperationContext* _txn;
- boost::scoped_ptr<Scope> _scope;
+ std::unique_ptr<Scope> _scope;
bool _onDisk; // if the end result of this map reduce is disk or not
- boost::scoped_ptr<InMemory> _temp;
+ std::unique_ptr<InMemory> _temp;
long _size; // bytes in _temp
long _dupCount; // number of duplicate key entries
diff --git a/src/mongo/db/commands/pipeline_command.cpp b/src/mongo/db/commands/pipeline_command.cpp
index 34c0c2e5976..d8e575e1dcf 100644
--- a/src/mongo/db/commands/pipeline_command.cpp
+++ b/src/mongo/db/commands/pipeline_command.cpp
@@ -28,7 +28,6 @@
#include "mongo/platform/basic.h"
-#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <vector>
@@ -57,7 +56,7 @@
namespace mongo {
using boost::intrusive_ptr;
- using boost::scoped_ptr;
+ using std::unique_ptr;
using boost::shared_ptr;
using std::unique_ptr;
using std::string;
@@ -218,7 +217,7 @@ namespace mongo {
}
PlanExecutor* exec = NULL;
- scoped_ptr<ClientCursorPin> pin; // either this OR the execHolder will be non-null
+ unique_ptr<ClientCursorPin> pin; // either this OR the execHolder will be non-null
unique_ptr<PlanExecutor> execHolder;
{
// This will throw if the sharding version for this connection is out of date. The
diff --git a/src/mongo/db/commands/plan_cache_commands.cpp b/src/mongo/db/commands/plan_cache_commands.cpp
index 0f7003e3dd9..de19f1e10a5 100644
--- a/src/mongo/db/commands/plan_cache_commands.cpp
+++ b/src/mongo/db/commands/plan_cache_commands.cpp
@@ -30,7 +30,6 @@
#include "mongo/platform/basic.h"
-#include <boost/scoped_ptr.hpp>
#include <string>
#include <sstream>
@@ -49,7 +48,7 @@
namespace {
- using boost::scoped_ptr;
+ using std::unique_ptr;
using std::string;
using namespace mongo;
@@ -116,7 +115,7 @@ namespace mongo {
using std::string;
using std::stringstream;
using std::vector;
- using boost::scoped_ptr;
+ using std::unique_ptr;
PlanCacheCommand::PlanCacheCommand(const string& name, const string& helpText,
ActionType actionType)
@@ -309,7 +308,7 @@ namespace mongo {
return status;
}
- scoped_ptr<CanonicalQuery> cq(cqRaw);
+ unique_ptr<CanonicalQuery> cq(cqRaw);
if (!planCache->contains(*cq)) {
// Log if asked to clear non-existent query shape.
@@ -379,7 +378,7 @@ namespace mongo {
return status;
}
- scoped_ptr<CanonicalQuery> cq(cqRaw);
+ unique_ptr<CanonicalQuery> cq(cqRaw);
if (!planCache.contains(*cq)) {
// Return empty plans in results if query shape does not
@@ -394,7 +393,7 @@ namespace mongo {
if (!result.isOK()) {
return result;
}
- scoped_ptr<PlanCacheEntry> entry(entryRaw);
+ unique_ptr<PlanCacheEntry> entry(entryRaw);
BSONArrayBuilder plansBuilder(bob->subarrayStart("plans"));
size_t numPlans = entry->plannerData.size();
diff --git a/src/mongo/db/commands/plan_cache_commands_test.cpp b/src/mongo/db/commands/plan_cache_commands_test.cpp
index 69a9c461a76..abdc2f53a94 100644
--- a/src/mongo/db/commands/plan_cache_commands_test.cpp
+++ b/src/mongo/db/commands/plan_cache_commands_test.cpp
@@ -33,7 +33,6 @@
#include "mongo/db/commands/plan_cache_commands.h"
#include <algorithm>
-#include <boost/scoped_ptr.hpp>
#include "mongo/db/json.h"
#include "mongo/db/operation_context_noop.h"
@@ -46,7 +45,7 @@ using namespace mongo;
namespace {
- using boost::scoped_ptr;
+ using std::unique_ptr;
using std::unique_ptr;
using std::string;
using std::vector;
@@ -196,36 +195,36 @@ namespace {
// Valid parameters
ASSERT_OK(PlanCacheCommand::canonicalize(&txn, ns, fromjson("{query: {a: 1, b: 1}}"), &cqRaw));
- scoped_ptr<CanonicalQuery> query(cqRaw);
+ unique_ptr<CanonicalQuery> query(cqRaw);
// Equivalent query should generate same key.
ASSERT_OK(PlanCacheCommand::canonicalize(&txn, ns, fromjson("{query: {b: 1, a: 1}}"), &cqRaw));
- scoped_ptr<CanonicalQuery> equivQuery(cqRaw);
+ unique_ptr<CanonicalQuery> equivQuery(cqRaw);
ASSERT_EQUALS(planCache.computeKey(*query), planCache.computeKey(*equivQuery));
// Sort query should generate different key from unsorted query.
ASSERT_OK(PlanCacheCommand::canonicalize(&txn, ns,
fromjson("{query: {a: 1, b: 1}, sort: {a: 1, b: 1}}"), &cqRaw));
- scoped_ptr<CanonicalQuery> sortQuery1(cqRaw);
+ unique_ptr<CanonicalQuery> sortQuery1(cqRaw);
ASSERT_NOT_EQUALS(planCache.computeKey(*query), planCache.computeKey(*sortQuery1));
// Confirm sort arguments are properly delimited (SERVER-17158)
ASSERT_OK(PlanCacheCommand::canonicalize(&txn, ns,
fromjson("{query: {a: 1, b: 1}, sort: {aab: 1}}"), &cqRaw));
- scoped_ptr<CanonicalQuery> sortQuery2(cqRaw);
+ unique_ptr<CanonicalQuery> sortQuery2(cqRaw);
ASSERT_NOT_EQUALS(planCache.computeKey(*sortQuery1), planCache.computeKey(*sortQuery2));
// Changing order and/or value of predicates should not change key
ASSERT_OK(PlanCacheCommand::canonicalize(&txn, ns,
fromjson("{query: {b: 3, a: 3}, sort: {a: 1, b: 1}}"), &cqRaw));
- scoped_ptr<CanonicalQuery> sortQuery3(cqRaw);
+ unique_ptr<CanonicalQuery> sortQuery3(cqRaw);
ASSERT_EQUALS(planCache.computeKey(*sortQuery1), planCache.computeKey(*sortQuery3));
// Projected query should generate different key from unprojected query.
ASSERT_OK(PlanCacheCommand::canonicalize(&txn, ns,
fromjson("{query: {a: 1, b: 1}, projection: {_id: 0, a: 1}}"), &cqRaw));
- scoped_ptr<CanonicalQuery> projectionQuery(cqRaw);
+ unique_ptr<CanonicalQuery> projectionQuery(cqRaw);
ASSERT_NOT_EQUALS(planCache.computeKey(*query), planCache.computeKey(*projectionQuery));
}
diff --git a/src/mongo/db/commands/test_commands.cpp b/src/mongo/db/commands/test_commands.cpp
index e0eeb67c365..1c4c9d7a508 100644
--- a/src/mongo/db/commands/test_commands.cpp
+++ b/src/mongo/db/commands/test_commands.cpp
@@ -183,7 +183,7 @@ namespace mongo {
RecordId end;
{
- boost::scoped_ptr<PlanExecutor> exec(InternalPlanner::collectionScan(txn,
+ std::unique_ptr<PlanExecutor> exec(InternalPlanner::collectionScan(txn,
nss.ns(),
collection,
InternalPlanner::BACKWARD));
diff --git a/src/mongo/db/commands/write_commands/batch_executor.cpp b/src/mongo/db/commands/write_commands/batch_executor.cpp
index f13689c1bf1..8f2ead63f7c 100644
--- a/src/mongo/db/commands/write_commands/batch_executor.cpp
+++ b/src/mongo/db/commands/write_commands/batch_executor.cpp
@@ -32,7 +32,6 @@
#include "mongo/db/commands/write_commands/batch_executor.h"
-#include <boost/scoped_ptr.hpp>
#include <memory>
#include "mongo/base/error_codes.h"
@@ -84,7 +83,7 @@
namespace mongo {
- using boost::scoped_ptr;
+ using std::unique_ptr;
using std::unique_ptr;
using std::endl;
using std::string;
@@ -1319,7 +1318,7 @@ namespace mongo {
invariant(collection);
PlanExecutor* rawExec;
uassertStatusOK(getExecutorUpdate(txn, collection, &parsedUpdate, debug, &rawExec));
- boost::scoped_ptr<PlanExecutor> exec(rawExec);
+ std::unique_ptr<PlanExecutor> exec(rawExec);
uassertStatusOK(exec->executePlan());
UpdateResult res = UpdateStage::makeUpdateResult(exec.get(), debug);
@@ -1423,7 +1422,7 @@ namespace mongo {
autoDb.getDb()->getCollection(nss),
&parsedDelete,
&rawExec));
- boost::scoped_ptr<PlanExecutor> exec(rawExec);
+ std::unique_ptr<PlanExecutor> exec(rawExec);
// Execute the delete and retrieve the number deleted.
uassertStatusOK(exec->executePlan());
diff --git a/src/mongo/db/commands/write_commands/batch_executor.h b/src/mongo/db/commands/write_commands/batch_executor.h
index 6216ae65c89..0bab41d3ff8 100644
--- a/src/mongo/db/commands/write_commands/batch_executor.h
+++ b/src/mongo/db/commands/write_commands/batch_executor.h
@@ -28,7 +28,6 @@
#pragma once
-#include <boost/scoped_ptr.hpp>
#include <string>
#include "mongo/base/disallow_copying.h"
@@ -149,7 +148,7 @@ namespace mongo {
LastError* _le;
// Stats
- boost::scoped_ptr<WriteBatchStats> _stats;
+ std::unique_ptr<WriteBatchStats> _stats;
};
/**
diff --git a/src/mongo/db/commands/write_commands/write_commands.cpp b/src/mongo/db/commands/write_commands/write_commands.cpp
index 3fbacd52b79..4bf374778fb 100644
--- a/src/mongo/db/commands/write_commands/write_commands.cpp
+++ b/src/mongo/db/commands/write_commands/write_commands.cpp
@@ -235,7 +235,7 @@ namespace mongo {
PlanExecutor* rawExec;
uassertStatusOK(getExecutorUpdate(txn, collection, &parsedUpdate, debug, &rawExec));
- boost::scoped_ptr<PlanExecutor> exec(rawExec);
+ std::unique_ptr<PlanExecutor> exec(rawExec);
// Explain the plan tree.
Explain::explainStages( exec.get(), verbosity, out );
@@ -275,7 +275,7 @@ namespace mongo {
PlanExecutor* rawExec;
uassertStatusOK(getExecutorDelete(txn, collection, &parsedDelete, &rawExec));
- boost::scoped_ptr<PlanExecutor> exec(rawExec);
+ std::unique_ptr<PlanExecutor> exec(rawExec);
// Explain the plan tree.
Explain::explainStages(exec.get(), verbosity, out);