# File lib/innodb/page/index.rb, line 493
  def make_record_description
    position = (0..RECORD_MAX_N_FIELDS).each
    description = record_describer.description
    fields = {:type => description[:type], :key => [], :sys => [], :row => []}

    description[:key].each do |field|
      fields[:key] << Innodb::Field.new(position.next, field[:name], *field[:type])
    end

    # If this is a leaf page of the clustered index, read InnoDB's internal
    # fields, a transaction ID and roll pointer.
    if level == 0 && fields[:type] == :clustered
      [["DB_TRX_ID", :TRX_ID,],["DB_ROLL_PTR", :ROLL_PTR]].each do |name, type|
        fields[:sys] << Innodb::Field.new(position.next, name, type, :NOT_NULL)
      end
    end

    # If this is a leaf page of the clustered index, or any page of a
    # secondary index, read the non-key fields.
    if (level == 0 && fields[:type] == :clustered) || (fields[:type] == :secondary)
      description[:row].each do |field|
        fields[:row] << Innodb::Field.new(position.next, field[:name], *field[:type])
      end
    end

    fields
  end