diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-05-19 10:42:29 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-05-23 16:11:30 -0400 |
commit | 2ab45c85946ed4a276c78b35864faf68514d408f (patch) | |
tree | 702d99b651c7949cbfe4a4db08ce897a708439c4 /src/mongo/db/catalog/index_catalog.cpp | |
parent | 9bcaf6baeaf80587b15feba88c598676b21f9f07 (diff) | |
download | mongo-2ab45c85946ed4a276c78b35864faf68514d408f.tar.gz |
SERVER-23968 Fixes for end-to-end query with collation using index
Diffstat (limited to 'src/mongo/db/catalog/index_catalog.cpp')
-rw-r--r-- | src/mongo/db/catalog/index_catalog.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mongo/db/catalog/index_catalog.cpp b/src/mongo/db/catalog/index_catalog.cpp index d75070b0ed6..2c3408a71fc 100644 --- a/src/mongo/db/catalog/index_catalog.cpp +++ b/src/mongo/db/catalog/index_catalog.cpp @@ -140,13 +140,14 @@ IndexCatalogEntry* IndexCatalog::_setupInMemoryStructures(OperationContext* txn, fassertFailedNoTrace(28782); } - unique_ptr<IndexCatalogEntry> entry(new IndexCatalogEntry(_collection->ns().ns(), - _collection->getCatalogEntry(), - descriptorCleanup.release(), - _collection->infoCache())); - - entry->init(txn, - _collection->_dbce->getIndex(txn, _collection->getCatalogEntry(), entry.get())); + auto entry = stdx::make_unique<IndexCatalogEntry>(txn, + _collection->ns().ns(), + _collection->getCatalogEntry(), + descriptorCleanup.release(), + _collection->infoCache()); + std::unique_ptr<IndexAccessMethod> accessMethod( + _collection->_dbce->getIndex(txn, _collection->getCatalogEntry(), entry.get())); + entry->init(std::move(accessMethod)); IndexCatalogEntry* save = entry.get(); _entries.add(entry.release()); |