summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/create_indexes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/create_indexes.cpp')
-rw-r--r--src/mongo/db/commands/create_indexes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/commands/create_indexes.cpp b/src/mongo/db/commands/create_indexes.cpp
index 841f9522ace..089bf040731 100644
--- a/src/mongo/db/commands/create_indexes.cpp
+++ b/src/mongo/db/commands/create_indexes.cpp
@@ -133,7 +133,7 @@ namespace mongo {
// lock for common calls. We only take write lock if needed.
// Note: createIndexes command does not currently respect shard versioning.
Client::ReadContext readContext(txn, ns, false /* doVersion */);
- const Collection* collection = readContext.ctx().db()->getCollection( ns.ns() );
+ const Collection* collection = readContext.ctx().db()->getCollection(txn, ns.ns());
if ( collection ) {
for ( size_t i = 0; i < specs.size(); i++ ) {
BSONObj spec = specs[i];