summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/query_stage_sort.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/dbtests/query_stage_sort.cpp')
-rw-r--r--src/mongo/dbtests/query_stage_sort.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mongo/dbtests/query_stage_sort.cpp b/src/mongo/dbtests/query_stage_sort.cpp
index bf3353d698b..6b09933f62a 100644
--- a/src/mongo/dbtests/query_stage_sort.cpp
+++ b/src/mongo/dbtests/query_stage_sort.cpp
@@ -76,7 +76,7 @@ public:
_client.insert(ns(), obj);
}
- void getRecordIds(set<RecordId>* out, Collection* coll) {
+ void getRecordIds(set<RecordId>* out, const Collection* coll) {
auto cursor = coll->getCursor(&_opCtx);
while (auto record = cursor->next()) {
out->insert(record->id);
@@ -86,7 +86,7 @@ public:
/**
* We feed a mix of (key, unowned, owned) data to the sort stage.
*/
- void insertVarietyOfObjects(WorkingSet* ws, QueuedDataStage* ms, Collection* coll) {
+ void insertVarietyOfObjects(WorkingSet* ws, QueuedDataStage* ms, const Collection* coll) {
set<RecordId> recordIds;
getRecordIds(&recordIds, coll);
@@ -111,7 +111,7 @@ public:
* which is owned by the caller.
*/
unique_ptr<PlanExecutor, PlanExecutor::Deleter> makePlanExecutorWithSortStage(
- Collection* coll) {
+ const Collection* coll) {
// Build the mock scan stage which feeds the data.
auto ws = std::make_unique<WorkingSet>();
_workingSet = ws.get();
@@ -152,7 +152,7 @@ public:
* If extAllowed is true, sorting will use use external sorting if available.
* If limit is not zero, we limit the output of the sort stage to 'limit' results.
*/
- void sortAndCheck(int direction, Collection* coll) {
+ void sortAndCheck(int direction, const Collection* coll) {
auto ws = std::make_unique<WorkingSet>();
auto queuedDataStage = std::make_unique<QueuedDataStage>(_expCtx.get(), ws.get());
@@ -259,7 +259,7 @@ public:
void run() {
dbtests::WriteContextForTests ctx(&_opCtx, ns());
Database* db = ctx.db();
- Collection* coll =
+ const Collection* coll =
CollectionCatalog::get(&_opCtx).lookupCollectionByNamespace(&_opCtx, nss());
if (!coll) {
WriteUnitOfWork wuow(&_opCtx);
@@ -282,7 +282,7 @@ public:
void run() {
dbtests::WriteContextForTests ctx(&_opCtx, ns());
Database* db = ctx.db();
- Collection* coll =
+ const Collection* coll =
CollectionCatalog::get(&_opCtx).lookupCollectionByNamespace(&_opCtx, nss());
if (!coll) {
WriteUnitOfWork wuow(&_opCtx);
@@ -314,7 +314,7 @@ public:
void run() {
dbtests::WriteContextForTests ctx(&_opCtx, ns());
Database* db = ctx.db();
- Collection* coll =
+ const Collection* coll =
CollectionCatalog::get(&_opCtx).lookupCollectionByNamespace(&_opCtx, nss());
if (!coll) {
WriteUnitOfWork wuow(&_opCtx);
@@ -340,7 +340,7 @@ public:
void run() {
dbtests::WriteContextForTests ctx(&_opCtx, ns());
Database* db = ctx.db();
- Collection* coll =
+ const Collection* coll =
CollectionCatalog::get(&_opCtx).lookupCollectionByNamespace(&_opCtx, nss());
if (!coll) {
WriteUnitOfWork wuow(&_opCtx);
@@ -455,7 +455,7 @@ public:
void run() {
dbtests::WriteContextForTests ctx(&_opCtx, ns());
Database* db = ctx.db();
- Collection* coll =
+ const Collection* coll =
CollectionCatalog::get(&_opCtx).lookupCollectionByNamespace(&_opCtx, nss());
if (!coll) {
WriteUnitOfWork wuow(&_opCtx);
@@ -559,7 +559,7 @@ public:
void run() {
dbtests::WriteContextForTests ctx(&_opCtx, ns());
Database* db = ctx.db();
- Collection* coll =
+ const Collection* coll =
CollectionCatalog::get(&_opCtx).lookupCollectionByNamespace(&_opCtx, nss());
if (!coll) {
WriteUnitOfWork wuow(&_opCtx);