The generator of Catmandu::Store::DBI::Iterator keeps executing queries (with offset increased by the limit parameter), even beyond the result boundary. The reason for this is that this line is never executed because decrementing of $total is skipped as soon as $rows is empty. So $total gets stuck at 1. I've changed the code to reset $total to the number of returned rows from the queries because that means that there won't be any more results.
results 0 - 99
results 100 - 199
results 200 - 201 -> here the generator keeps executing queries
The generator of
Catmandu::Store::DBI::Iterator
keeps executing queries (with offset increased by the limit parameter), even beyond the result boundary. The reason for this is that this line is never executed because decrementing of$total
is skipped as soon as$rows
is empty. So$total
gets stuck at1
. I've changed the code to reset$total
to the number of returned rows from the queries because that means that there won't be any more results.results 0 - 99 results 100 - 199 results 200 - 201 -> here the generator keeps executing queries