1
0
Fork 0

getting tests to work

This commit is contained in:
James 2014-11-06 12:24:28 +00:00
parent c063b85d29
commit c54b92c6e7
1 changed files with 4 additions and 3 deletions

View File

@ -473,7 +473,8 @@ int ExecutionBlock::getOrSkipSome (size_t atLeast,
return TRI_ERROR_NO_ERROR;
}
else {
if (! getBlock(atLeast - skipped, atMost - skipped)) {
if (! getBlock(atLeast - skipped,
(std::max)(atMost - skipped, DefaultBatchSize))) {
_done = true;
break; // must still put things in the result from the collector . . .
}
@ -1109,7 +1110,7 @@ AqlItemBlock* IndexRangeBlock::getSome (size_t atLeast,
// try again!
if (_buffer.empty()) {
if (! ExecutionBlock::getBlock(atLeast, atMost)) {
if (! ExecutionBlock::getBlock(DefaultBatchSize, DefaultBatchSize)) {
_done = true;
return nullptr;
}
@ -1208,7 +1209,7 @@ size_t IndexRangeBlock::skipSome (size_t atLeast,
while (skipped < atLeast ){
if (_buffer.empty()) {
if (! ExecutionBlock::getBlock(atLeast, atMost)) {
if (! ExecutionBlock::getBlock(DefaultBatchSize, DefaultBatchSize)) {
_done = true;
return skipped;
}