1
0
Fork 0

fixed index lookup issues

This commit is contained in:
Jan Steemann 2016-01-18 17:35:54 +01:00
parent c34d74933b
commit f059b0e5f7
2 changed files with 9 additions and 8 deletions

View File

@ -793,16 +793,17 @@ IndexIterator* EdgeIndex::createIterator(
THROW_ARANGO_EXCEPTION(TRI_ERROR_DEBUG);
}
}
if (keys.empty()) {
// nothing to do
return nullptr;
}
// _from or _to?
bool const isFrom =
(strcmp(attrNode->getStringValue(), TRI_VOC_ATTRIBUTE_FROM) == 0);
if (keys.empty()) {
// nothing to do. still need to return an empty iterator
return new EdgeIndexIterator(isFrom ? _edgesFrom : _edgesTo, keys);
}
TRI_IF_FAILURE("EdgeIndex::noIterator") {
THROW_ARANGO_EXCEPTION(TRI_ERROR_DEBUG);
}

View File

@ -474,8 +474,8 @@ IndexIterator* PrimaryIndex::createIterator(
}
if (keys.empty()) {
// nothing to do
return nullptr;
// nothing to do: still new to return an empty iterator
return new PrimaryIndexIterator(this, keys);
}
TRI_IF_FAILURE("PrimaryIndex::noIterator") {