1
0
Fork 0

fixed "collection not found" errors

This commit is contained in:
jsteemann 2016-08-18 11:24:19 +02:00
parent a2085066e0
commit b5cfdb47b3
1 changed files with 7 additions and 4 deletions

View File

@ -837,9 +837,9 @@ std::vector<std::string> TRI_vocbase_t::collectionNames() {
std::vector<std::string> result;
READ_LOCKER(readLocker, _collectionsLock);
for (auto const& it : _collectionsById) {
result.emplace_back(it.second->name());
result.reserve(_collectionsByName.size());
for (auto const& it : _collectionsByName) {
result.emplace_back(it.first);
}
return result;
@ -1421,7 +1421,10 @@ std::vector<TRI_vocbase_col_t*> TRI_vocbase_t::collections() {
{
READ_LOCKER(readLocker, _collectionsLock);
collections = _collections;
collections.reserve(_collectionsById.size());
for (auto const& it : _collectionsById) {
collections.emplace_back(it.second);
}
}
return collections;
}