diff options
Diffstat (limited to 'src/mongo/db/dbcommands.cpp')
-rw-r--r-- | src/mongo/db/dbcommands.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp index e6c6d36ce41..147f86d9161 100644 --- a/src/mongo/db/dbcommands.cpp +++ b/src/mongo/db/dbcommands.cpp @@ -62,7 +62,7 @@ #include "mongo/db/lasterror.h" #include "mongo/db/namespace_string.h" #include "mongo/db/ops/insert.h" -#include "mongo/db/query/get_runner.h" +#include "mongo/db/query/get_executor.h" #include "mongo/db/query/internal_plans.h" #include "mongo/db/query/query_planner.h" #include "mongo/db/repair_database.h" @@ -673,23 +673,23 @@ namespace mongo { return 0; } - Runner* rawRunner; - if (!getRunner(txn, coll, cq, &rawRunner, QueryPlannerParams::NO_TABLE_SCAN).isOK()) { - uasserted(17241, "Can't get runner for query " + query.toString()); + PlanExecutor* rawExec; + if (!getExecutor(txn, coll, cq, &rawExec, QueryPlannerParams::NO_TABLE_SCAN).isOK()) { + uasserted(17241, "Can't get executor for query " + query.toString()); return 0; } - auto_ptr<Runner> runner(rawRunner); + auto_ptr<PlanExecutor> exec(rawExec); - // The runner must be registered to be informed of DiskLoc deletions and NS dropping + // The executor must be registered to be informed of DiskLoc deletions and NS dropping // when we yield the lock below. - const ScopedRunnerRegistration safety(runner.get()); + const ScopedExecutorRegistration safety(exec.get()); const ChunkVersion shardVersionAtStart = shardingState.getVersion(ns); BSONObj obj; Runner::RunnerState state; - while (Runner::RUNNER_ADVANCED == (state = runner->getNext(&obj, NULL))) { + while (Runner::RUNNER_ADVANCED == (state = exec->getNext(&obj, NULL))) { BSONElement ne = obj["n"]; verify(ne.isNumber()); int myn = ne.numberInt(); @@ -788,7 +788,7 @@ namespace mongo { result.appendBool( "estimate" , estimate ); - auto_ptr<Runner> runner; + auto_ptr<PlanExecutor> exec; if ( min.isEmpty() && max.isEmpty() ) { if ( estimate ) { result.appendNumber( "size" , static_cast<long long>(collection->dataSize()) ); @@ -797,7 +797,7 @@ namespace mongo { result.append( "millis" , timer.millis() ); return 1; } - runner.reset(InternalPlanner::collectionScan(txn, ns,collection)); + exec.reset(InternalPlanner::collectionScan(txn, ns,collection)); } else if ( min.isEmpty() || max.isEmpty() ) { errmsg = "only one of min or max specified"; @@ -822,7 +822,7 @@ namespace mongo { min = Helpers::toKeyFormat( kp.extendRangeBound( min, false ) ); max = Helpers::toKeyFormat( kp.extendRangeBound( max, false ) ); - runner.reset(InternalPlanner::indexScan(txn, collection, idx, min, max, false)); + exec.reset(InternalPlanner::indexScan(txn, collection, idx, min, max, false)); } long long avgObjSize = collection->dataSize() / collection->numRecords(); @@ -835,7 +835,7 @@ namespace mongo { DiskLoc loc; Runner::RunnerState state; - while (Runner::RUNNER_ADVANCED == (state = runner->getNext(NULL, &loc))) { + while (Runner::RUNNER_ADVANCED == (state = exec->getNext(NULL, &loc))) { if ( estimate ) size += avgObjSize; else |