1
0
Fork 0

Fix a bug in list access for AqlValues.

This commit is contained in:
Max Neunhoeffer 2014-11-28 11:21:47 +01:00 committed by Frank Celler
parent aa37504e09
commit cfd71a5bb0
1 changed files with 3 additions and 0 deletions

View File

@ -724,6 +724,7 @@ Json AqlValue::extractListMember (triagens::arango::AqlTransaction* trx,
auto vecCollection = (*it)->getDocumentCollection(0);
return (*it)->getValue(p - totalSize, 0).toJson(trx, vecCollection);
}
totalSize += (*it)->size();
}
break; // fall-through to returning null
}
@ -762,6 +763,8 @@ AqlValue AqlValue::CreateFromBlocks (triagens::arango::AqlTransaction* trx,
for (RegisterId j = 0; j < n; ++j) {
if (variableNames[j][0] != '\0') {
// temporaries don't have a name and won't be included
// Variables from depth 0 are excluded, too, unless the
// COLLECT statement is on level 0 as well.
values.set(variableNames[j].c_str(), current->getValue(i, j).toJson(trx, current->getDocumentCollection(j)));
}
}