# File lib/active_record/vendor/mysql411.rb, line 277
  def read_query_result_41
    data = read
    @field_count = get_length(data)
    if @field_count == nil then         # LOAD DATA LOCAL INFILE
      File::open(data) do |f|
        write f.read
      end
      write ""          # mark EOF
      data = read
      @field_count = get_length(data)
    end
    if @field_count == 0 then
      @affected_rows = get_length(data, true)
      @insert_id = get_length(data, true)
      if @server_capabilities & CLIENT_TRANSACTIONS != 0 then
        a = data.slice!(0,2)
        @server_status = a[0]+a[1]*256
      end
      if data.size > 0 and get_length(data) then
        @info = data
      end
    else
      @extra_info = get_length(data, true)
      fields = read_rows 7
      @fields = unpack_fields(fields, @server_capabilities & CLIENT_LONG_FLAG != 0)
      @status = :STATUS_GET_RESULT
    end
    self
  end