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.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/dbtests/plan_ranking.cpp b/src/mongo/dbtests/plan_ranking.cpp
index 240371f1482..79419bb60fa 100644
--- a/src/mongo/dbtests/plan_ranking.cpp
+++ b/src/mongo/dbtests/plan_ranking.cpp
@@ -60,7 +60,10 @@ namespace PlanRankingTests {
class PlanRankingTestBase {
public:
- PlanRankingTestBase() : _internalQueryForceIntersectionPlans(internalQueryForceIntersectionPlans) {
+ PlanRankingTestBase()
+ : _internalQueryForceIntersectionPlans(internalQueryForceIntersectionPlans),
+ _client(&_txn) {
+
Client::WriteContext ctx(&_txn, ns);
_client.dropCollection(ns);
}
@@ -140,12 +143,13 @@ namespace PlanRankingTests {
OperationContextImpl _txn;
private:
-
- DBDirectClient _client;
- scoped_ptr<MultiPlanStage> _mps;
// Holds the value of global "internalQueryForceIntersectionPlans" setParameter flag.
// Restored at end of test invocation regardless of test result.
bool _internalQueryForceIntersectionPlans;
+
+ scoped_ptr<MultiPlanStage> _mps;
+
+ DBDirectClient _client;
};
// static