If you use something like each_hash to loop over a Mysql::Result set in Ruby when using the Mysql gem then you end up at the end of the result set and any subsequent each_hash loop doesn't have anything to loop over.
I see there is a Mysql::Result#row_seek method, which expects a Mysql::RowOffset object. But I'm unable to find any documentation for this.