# File lib/innodb/page/index.rb, line 688
    def next_record
      Innodb::Stats.increment :page_record_cursor_next_record

      rec = @page.record(@record.next)

      # The garbage record list's end is self-linked, so we must check for
      # both supremum and the current record's offset.
      if rec == @page.supremum || rec.offset == @record.offset
        # We've reached the end of the linked list at supremum.
        nil
      else
        @record = rec
      end
    end