// Continue getting rows one page at a time until the memory limit
// is reached, all results have been retrieved, or the rest
// of the results have been determined to be irrelevant.
while (!killThread
&& !qds.allRecordsRetrieved()
&& currentlyFilledTo + pageSize <= blockEnd)
{
// This caters for when memoryLimit is not a multiple of
// pageSize which it never is because we always add 1 above.
// not applicable if the db has no native limit where this