diff options
Diffstat (limited to 'src/mongo/dbtests/query_single_solution_runner.cpp')
-rw-r--r-- | src/mongo/dbtests/query_single_solution_runner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/dbtests/query_single_solution_runner.cpp b/src/mongo/dbtests/query_single_solution_runner.cpp index 2d6064b90d7..beae1e0ec7e 100644 --- a/src/mongo/dbtests/query_single_solution_runner.cpp +++ b/src/mongo/dbtests/query_single_solution_runner.cpp @@ -120,7 +120,7 @@ namespace QuerySingleSolutionRunner { BSONObj& indexSpec, int start, int end) { // Build the index scan stage. IndexScanParams ixparams; - ixparams.descriptor = getIndex(indexSpec); + ixparams.descriptor = getIndex(context.db(), indexSpec); ixparams.bounds.isSimpleRange = true; ixparams.bounds.startKey = BSON("" << start); ixparams.bounds.endKey = BSON("" << end); @@ -163,8 +163,8 @@ namespace QuerySingleSolutionRunner { } private: - IndexDescriptor* getIndex(const BSONObj& obj) { - Collection* collection = cc().database()->getCollection( ns() ); + IndexDescriptor* getIndex(Database* db, const BSONObj& obj) { + Collection* collection = db->getCollection( ns() ); return collection->getIndexCatalog()->findIndexByKeyPattern(obj); } |