1
0
Fork 0

Fixed a bug when using a skiplist index in traversals like: [a, unused, _from]. If unused is not part of the condition the traverser ran into undef behaviour.

This commit is contained in:
Michael Hackstein 2016-11-29 10:01:34 +01:00
parent 7e46422cbf
commit 7aea35e444
1 changed files with 3 additions and 1 deletions

View File

@ -1009,7 +1009,9 @@ void TraversalNode::prepareOptions() {
} else {
std::vector<std::vector<std::string>> fieldNames =
info.idxHandles[0].fieldNames();
for (size_t i = 0; i < fieldNames.size(); ++i) {
size_t max = info.indexCondition->numMembers();
TRI_ASSERT(max <= fieldNames.size());
for (size_t i = 0; i < max; ++i) {
auto const& f = fieldNames[i];
if (f.size() == 1 && f[0] == usedField) {
// we only work for _from and _to not _from.foo which would be null anyways...