mirror of https://gitee.com/bigwinds/arangodb
Fix SubqueryStartExecutor (#10488)
fetchRow must not be called with `atMost == 0`, which can happen if output.numRowsLeft() == 1.
This commit is contained in:
parent
f42dd86b25
commit
688a680023
|
@ -60,7 +60,8 @@ std::pair<ExecutionState, NoStats> SubqueryStartExecutor::produceRows(OutputAqlI
|
|||
output.createShadowRow(_input);
|
||||
_input = InputAqlItemRow(CreateInvalidInputRowHint{});
|
||||
} else {
|
||||
std::tie(_state, _input) = _fetcher.fetchRow(output.numRowsLeft() / 2);
|
||||
// We need to round the number of rows, otherwise this might be called with atMost == 0
|
||||
std::tie(_state, _input) = _fetcher.fetchRow((output.numRowsLeft() + 1) / 2);
|
||||
if (!_input.isInitialized()) {
|
||||
TRI_ASSERT(_state == ExecutionState::WAITING || _state == ExecutionState::DONE);
|
||||
return {_state, NoStats{}};
|
||||
|
|
Loading…
Reference in New Issue