diff options
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r-- | src/mongo/dbtests/counttests.cpp | 5 | ||||
-rw-r--r-- | src/mongo/dbtests/indexupdatetests.cpp | 21 | ||||
-rw-r--r-- | src/mongo/dbtests/pdfiletests.cpp | 5 | ||||
-rw-r--r-- | src/mongo/dbtests/query_stage_cached_plan.cpp | 3 | ||||
-rw-r--r-- | src/mongo/dbtests/query_stage_count.cpp | 6 | ||||
-rw-r--r-- | src/mongo/dbtests/query_stage_ixscan.cpp | 3 | ||||
-rw-r--r-- | src/mongo/dbtests/query_stage_sort.cpp | 5 | ||||
-rw-r--r-- | src/mongo/dbtests/querytests.cpp | 5 | ||||
-rw-r--r-- | src/mongo/dbtests/repltests.cpp | 5 | ||||
-rw-r--r-- | src/mongo/dbtests/rollbacktests.cpp | 3 | ||||
-rw-r--r-- | src/mongo/dbtests/validate_tests.cpp | 10 |
11 files changed, 23 insertions, 48 deletions
diff --git a/src/mongo/dbtests/counttests.cpp b/src/mongo/dbtests/counttests.cpp index 2e28621b833..f6f0f48c858 100644 --- a/src/mongo/dbtests/counttests.cpp +++ b/src/mongo/dbtests/counttests.cpp @@ -90,7 +90,6 @@ protected: void insert(const char* s) { WriteUnitOfWork wunit(&_txn); const BSONObj o = fromjson(s); - OpDebug* const nullOpDebug = nullptr; if (o["_id"].eoo()) { BSONObjBuilder b; @@ -98,9 +97,9 @@ protected: oid.init(); b.appendOID("_id", &oid); b.appendElements(o); - _collection->insertDocument(&_txn, b.obj(), nullOpDebug, false); + _collection->insertDocument(&_txn, b.obj(), false); } else { - _collection->insertDocument(&_txn, o, nullOpDebug, false); + _collection->insertDocument(&_txn, o, false); } wunit.commit(); } diff --git a/src/mongo/dbtests/indexupdatetests.cpp b/src/mongo/dbtests/indexupdatetests.cpp index 3b3c3531ec9..e81c45bdd94 100644 --- a/src/mongo/dbtests/indexupdatetests.cpp +++ b/src/mongo/dbtests/indexupdatetests.cpp @@ -351,16 +351,13 @@ public: db->dropCollection(&_txn, _ns); coll = db->createCollection(&_txn, _ns); - OpDebug* const nullOpDebug = nullptr; coll->insertDocument(&_txn, BSON("_id" << 1 << "a" << "dup"), - nullOpDebug, true); coll->insertDocument(&_txn, BSON("_id" << 2 << "a" << "dup"), - nullOpDebug, true); wunit.commit(); } @@ -397,16 +394,13 @@ public: db->dropCollection(&_txn, _ns); coll = db->createCollection(&_txn, _ns); - OpDebug* const nullOpDebug = nullptr; coll->insertDocument(&_txn, BSON("_id" << 1 << "a" << "dup"), - nullOpDebug, true); coll->insertDocument(&_txn, BSON("_id" << 2 << "a" << "dup"), - nullOpDebug, true); wunit.commit(); } @@ -442,16 +436,13 @@ public: db->dropCollection(&_txn, _ns); coll = db->createCollection(&_txn, _ns); - OpDebug* const nullOpDebug = nullptr; ASSERT_OK(coll->insertDocument(&_txn, BSON("_id" << 1 << "a" << "dup"), - nullOpDebug, true)); ASSERT_OK(coll->insertDocument(&_txn, BSON("_id" << 2 << "a" << "dup"), - nullOpDebug, true)); wunit.commit(); } @@ -497,9 +488,8 @@ public: coll->getIndexCatalog()->dropAllIndexes(&_txn, true); // Insert some documents with enforceQuota=true. int32_t nDocs = 1000; - OpDebug* const nullOpDebug = nullptr; for (int32_t i = 0; i < nDocs; ++i) { - coll->insertDocument(&_txn, BSON("a" << i), nullOpDebug, true); + coll->insertDocument(&_txn, BSON("a" << i), true); } wunit.commit(); } @@ -530,9 +520,8 @@ public: coll->getIndexCatalog()->dropAllIndexes(&_txn, true); // Insert some documents. int32_t nDocs = 1000; - OpDebug* const nullOpDebug = nullptr; for (int32_t i = 0; i < nDocs; ++i) { - coll->insertDocument(&_txn, BSON("a" << i), nullOpDebug, true); + coll->insertDocument(&_txn, BSON("a" << i), true); } wunit.commit(); } @@ -566,9 +555,8 @@ public: coll->getIndexCatalog()->dropAllIndexes(&_txn, true); // Insert some documents. int32_t nDocs = 1000; - OpDebug* const nullOpDebug = nullptr; for (int32_t i = 0; i < nDocs; ++i) { - coll->insertDocument(&_txn, BSON("_id" << i), nullOpDebug, true); + coll->insertDocument(&_txn, BSON("_id" << i), true); } wunit.commit(); } @@ -602,9 +590,8 @@ public: coll->getIndexCatalog()->dropAllIndexes(&_txn, true); // Insert some documents. int32_t nDocs = 1000; - OpDebug* const nullOpDebug = nullptr; for (int32_t i = 0; i < nDocs; ++i) { - coll->insertDocument(&_txn, BSON("_id" << i), nullOpDebug, true); + coll->insertDocument(&_txn, BSON("_id" << i), true); } wunit.commit(); } diff --git a/src/mongo/dbtests/pdfiletests.cpp b/src/mongo/dbtests/pdfiletests.cpp index 311e5a5e20d..943f0a124fd 100644 --- a/src/mongo/dbtests/pdfiletests.cpp +++ b/src/mongo/dbtests/pdfiletests.cpp @@ -76,14 +76,13 @@ public: BSONObj x = BSON("x" << 1); ASSERT(x["_id"].type() == 0); Collection* collection = _context.db()->getOrCreateCollection(&_txn, ns()); - OpDebug* const nullOpDebug = nullptr; - ASSERT(!collection->insertDocument(&_txn, x, nullOpDebug, true).isOK()); + ASSERT(!collection->insertDocument(&_txn, x, true).isOK()); StatusWith<BSONObj> fixed = fixDocumentForInsert(x); ASSERT(fixed.isOK()); x = fixed.getValue(); ASSERT(x["_id"].type() == jstOID); - ASSERT(collection->insertDocument(&_txn, x, nullOpDebug, true).isOK()); + ASSERT(collection->insertDocument(&_txn, x, true).isOK()); wunit.commit(); } }; diff --git a/src/mongo/dbtests/query_stage_cached_plan.cpp b/src/mongo/dbtests/query_stage_cached_plan.cpp index 865ee18dacc..be91a55fdf1 100644 --- a/src/mongo/dbtests/query_stage_cached_plan.cpp +++ b/src/mongo/dbtests/query_stage_cached_plan.cpp @@ -93,8 +93,7 @@ public: WriteUnitOfWork wuow(&_txn); const bool enforceQuota = false; - OpDebug* const nullOpDebug = nullptr; - ASSERT_OK(collection->insertDocument(&_txn, obj, nullOpDebug, enforceQuota)); + ASSERT_OK(collection->insertDocument(&_txn, obj, enforceQuota)); wuow.commit(); } diff --git a/src/mongo/dbtests/query_stage_count.cpp b/src/mongo/dbtests/query_stage_count.cpp index f325004216f..de3d484dbaa 100644 --- a/src/mongo/dbtests/query_stage_count.cpp +++ b/src/mongo/dbtests/query_stage_count.cpp @@ -105,15 +105,13 @@ public: void insert(const BSONObj& doc) { WriteUnitOfWork wunit(&_txn); - OpDebug* const nullOpDebug = nullptr; - _coll->insertDocument(&_txn, doc, nullOpDebug, false); + _coll->insertDocument(&_txn, doc, false); wunit.commit(); } void remove(const RecordId& recordId) { WriteUnitOfWork wunit(&_txn); - OpDebug* const nullOpDebug = nullptr; - _coll->deleteDocument(&_txn, recordId, nullOpDebug); + _coll->deleteDocument(&_txn, recordId); wunit.commit(); } diff --git a/src/mongo/dbtests/query_stage_ixscan.cpp b/src/mongo/dbtests/query_stage_ixscan.cpp index 8b619d9dfce..12e8f33fb3c 100644 --- a/src/mongo/dbtests/query_stage_ixscan.cpp +++ b/src/mongo/dbtests/query_stage_ixscan.cpp @@ -64,8 +64,7 @@ public: void insert(const BSONObj& doc) { WriteUnitOfWork wunit(&_txn); - OpDebug* const nullOpDebug = nullptr; - ASSERT_OK(_coll->insertDocument(&_txn, doc, nullOpDebug, false)); + ASSERT_OK(_coll->insertDocument(&_txn, doc, false)); wunit.commit(); } diff --git a/src/mongo/dbtests/query_stage_sort.cpp b/src/mongo/dbtests/query_stage_sort.cpp index fabf10ba05b..676da68abcd 100644 --- a/src/mongo/dbtests/query_stage_sort.cpp +++ b/src/mongo/dbtests/query_stage_sort.cpp @@ -459,11 +459,10 @@ public: // We should have read in the first 'firstRead' recordIds. Invalidate the first. exec->saveState(); - OpDebug* const nullOpDebug = nullptr; set<RecordId>::iterator it = recordIds.begin(); { WriteUnitOfWork wuow(&_txn); - coll->deleteDocument(&_txn, *it++, nullOpDebug); + coll->deleteDocument(&_txn, *it++); wuow.commit(); } exec->restoreState(); @@ -479,7 +478,7 @@ public: while (it != recordIds.end()) { { WriteUnitOfWork wuow(&_txn); - coll->deleteDocument(&_txn, *it++, nullOpDebug); + coll->deleteDocument(&_txn, *it++); wuow.commit(); } } diff --git a/src/mongo/dbtests/querytests.cpp b/src/mongo/dbtests/querytests.cpp index 8cf6d28d1a5..49c11d6dd44 100644 --- a/src/mongo/dbtests/querytests.cpp +++ b/src/mongo/dbtests/querytests.cpp @@ -99,16 +99,15 @@ protected: void insert(const BSONObj& o) { WriteUnitOfWork wunit(&_txn); - OpDebug* const nullOpDebug = nullptr; if (o["_id"].eoo()) { BSONObjBuilder b; OID oid; oid.init(); b.appendOID("_id", &oid); b.appendElements(o); - _collection->insertDocument(&_txn, b.obj(), nullOpDebug, false); + _collection->insertDocument(&_txn, b.obj(), false); } else { - _collection->insertDocument(&_txn, o, nullOpDebug, false); + _collection->insertDocument(&_txn, o, false); } wunit.commit(); } diff --git a/src/mongo/dbtests/repltests.cpp b/src/mongo/dbtests/repltests.cpp index ec092669747..0becd7c9fba 100644 --- a/src/mongo/dbtests/repltests.cpp +++ b/src/mongo/dbtests/repltests.cpp @@ -249,10 +249,9 @@ protected: coll = db->createCollection(&_txn, ns()); } - OpDebug* const nullOpDebug = nullptr; if (o.hasField("_id")) { _txn.setReplicatedWrites(false); - coll->insertDocument(&_txn, o, nullOpDebug, true); + coll->insertDocument(&_txn, o, true); _txn.setReplicatedWrites(true); wunit.commit(); return; @@ -264,7 +263,7 @@ protected: b.appendOID("_id", &id); b.appendElements(o); _txn.setReplicatedWrites(false); - coll->insertDocument(&_txn, b.obj(), nullOpDebug, true); + coll->insertDocument(&_txn, b.obj(), true); _txn.setReplicatedWrites(true); wunit.commit(); } diff --git a/src/mongo/dbtests/rollbacktests.cpp b/src/mongo/dbtests/rollbacktests.cpp index f437cb68c64..41405295e14 100644 --- a/src/mongo/dbtests/rollbacktests.cpp +++ b/src/mongo/dbtests/rollbacktests.cpp @@ -88,8 +88,7 @@ Status truncateCollection(OperationContext* txn, const NamespaceString& nss) { void insertRecord(OperationContext* txn, const NamespaceString& nss, const BSONObj& data) { Collection* coll = dbHolder().get(txn, nss.db())->getCollection(nss.ns()); - OpDebug* const nullOpDebug = nullptr; - ASSERT_OK(coll->insertDocument(txn, data, nullOpDebug, false)); + ASSERT_OK(coll->insertDocument(txn, data, false)); } void assertOnlyRecord(OperationContext* txn, const NamespaceString& nss, const BSONObj& data) { Collection* coll = dbHolder().get(txn, nss.db())->getCollection(nss.ns()); diff --git a/src/mongo/dbtests/validate_tests.cpp b/src/mongo/dbtests/validate_tests.cpp index 51f540aa41c..fe82b1c5589 100644 --- a/src/mongo/dbtests/validate_tests.cpp +++ b/src/mongo/dbtests/validate_tests.cpp @@ -106,14 +106,13 @@ public: Collection* coll; RecordId id1; { - OpDebug* const nullOpDebug = nullptr; WriteUnitOfWork wunit(&_txn); ASSERT_OK(db->dropCollection(&_txn, _ns)); coll = db->createCollection(&_txn, _ns); - ASSERT_OK(coll->insertDocument(&_txn, BSON("_id" << 1), nullOpDebug, true)); + ASSERT_OK(coll->insertDocument(&_txn, BSON("_id" << 1), true)); id1 = coll->getCursor(&_txn)->next()->id; - ASSERT_OK(coll->insertDocument(&_txn, BSON("_id" << 2), nullOpDebug, true)); + ASSERT_OK(coll->insertDocument(&_txn, BSON("_id" << 2), true)); wunit.commit(); } @@ -156,13 +155,12 @@ public: Collection* coll; RecordId id1; { - OpDebug* const nullOpDebug = nullptr; WriteUnitOfWork wunit(&_txn); ASSERT_OK(db->dropCollection(&_txn, _ns)); coll = db->createCollection(&_txn, _ns); - ASSERT_OK(coll->insertDocument(&_txn, BSON("_id" << 1 << "a" << 1), nullOpDebug, true)); + ASSERT_OK(coll->insertDocument(&_txn, BSON("_id" << 1 << "a" << 1), true)); id1 = coll->getCursor(&_txn)->next()->id; - ASSERT_OK(coll->insertDocument(&_txn, BSON("_id" << 2 << "a" << 2), nullOpDebug, true)); + ASSERT_OK(coll->insertDocument(&_txn, BSON("_id" << 2 << "a" << 2), true)); wunit.commit(); } |