  virtual int prev()
  {
    if (io_cache)
    {
      if (rownum == 0)
        return -1;

      rownum--;
      return 0;
    }
    else
    {
      /* Allow multiple prev() calls when positioned at the start. */
      if (cache_pos == cache_start)
        return -1;
      cache_pos-= ref_length;
      DBUG_ASSERT(cache_pos >= cache_start);
      return 0;
    }
  }
  virtual int prev()
  {
    if (io_cache)
    {
      if (rownum == 0)
        return -1;

      rownum--;
      return 0;
    }
    else
    {
       
      if (cache_pos == cache_start)
        return -1;
      cache_pos-= ref_length;
      DBUG_ASSERT(cache_pos >= cache_start);
      return 0;
    }
  }