diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2017-03-21 11:22:11 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2017-03-22 13:09:21 -0400 |
commit | d66405f651b0a49a06aacb286e3d1740a0b020af (patch) | |
tree | 86f20f45d29d63b53137772c13ea8e917193b18e /src/mongo/dbtests | |
parent | 70151a3b5cc65bd1b16831c523a6f5b477b82c3d (diff) | |
download | mongo-d66405f651b0a49a06aacb286e3d1740a0b020af.tar.gz |
SERVER-9609 Ensure users can only call getMore on cursors they created
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r-- | src/mongo/dbtests/query_plan_executor.cpp | 6 | ||||
-rw-r--r-- | src/mongo/dbtests/querytests.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/dbtests/query_plan_executor.cpp b/src/mongo/dbtests/query_plan_executor.cpp index b2e15787c0d..3b2ce822a45 100644 --- a/src/mongo/dbtests/query_plan_executor.cpp +++ b/src/mongo/dbtests/query_plan_executor.cpp @@ -449,7 +449,7 @@ public: auto exec = makeCollScanExec(coll, filterObj); // Make a client cursor from the plan executor. - coll->getCursorManager()->registerCursor({std::move(exec), nss, false, BSONObj()}); + coll->getCursorManager()->registerCursor({std::move(exec), nss, {}, false, BSONObj()}); // There should be one cursor before invalidation, // and zero cursors after invalidation. @@ -476,7 +476,7 @@ public: // Make a client cursor from the plan executor. auto ccPin = collection->getCursorManager()->registerCursor( - {std::move(exec), nss, false, BSONObj()}); + {std::move(exec), nss, {}, false, BSONObj()}); // If the cursor is pinned, it sticks around, even after invalidation. ASSERT_EQUALS(1U, numCursors()); @@ -519,7 +519,7 @@ public: // Make a client cursor from the plan executor. collection->getCursorManager()->registerCursor( - {std::move(exec), nss, false, BSONObj()}); + {std::move(exec), nss, {}, false, BSONObj()}); } // There should be one cursor before timeout, diff --git a/src/mongo/dbtests/querytests.cpp b/src/mongo/dbtests/querytests.cpp index d705399e27c..6894117ce4c 100644 --- a/src/mongo/dbtests/querytests.cpp +++ b/src/mongo/dbtests/querytests.cpp @@ -1807,7 +1807,7 @@ public: for (int i = 0; i < 1000; i++) { auto exec = makeFakePlanExecutor(opCtx.get()); auto cursorPin = CursorManager::getGlobalCursorManager()->registerCursor( - {std::move(exec), NamespaceString{"test.collection"}, false, BSONObj()}); + {std::move(exec), NamespaceString{"test.collection"}, {}, false, BSONObj()}); ASSERT_TRUE(CursorManager::isGloballyManagedCursor(cursorPin.getCursor()->cursorid())); } } @@ -1822,7 +1822,7 @@ public: for (int i = 0; i < 1000; i++) { auto exec = makeFakePlanExecutor(opCtx.get()); auto cursorPin = testManager.registerCursor( - {std::move(exec), NamespaceString{"test.collection"}, false, BSONObj()}); + {std::move(exec), NamespaceString{"test.collection"}, {}, false, BSONObj()}); ASSERT_FALSE(CursorManager::isGloballyManagedCursor(cursorPin.getCursor()->cursorid())); } } @@ -1838,7 +1838,7 @@ public: for (int i = 0; i < 1000; i++) { auto exec = makeFakePlanExecutor(opCtx.get()); auto cursorPin = testManager.registerCursor( - {std::move(exec), NamespaceString{"test.collection"}, false, BSONObj()}); + {std::move(exec), NamespaceString{"test.collection"}, {}, false, BSONObj()}); auto cursorId = cursorPin.getCursor()->cursorid(); if (prefix) { ASSERT_EQ(*prefix, extractLeading32Bits(cursorId)); |