~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_rnext.c

Renamed more stuff to drizzle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
  int error,changed;
28
28
  uint flag;
29
29
  int res= 0;
 
30
  DBUG_ENTER("mi_rnext");
30
31
 
31
32
  if ((inx = _mi_check_index(info,inx)) < 0)
32
 
    return(my_errno);
 
33
    DBUG_RETURN(my_errno);
33
34
  flag=SEARCH_BIGGER;                           /* Read next */
34
35
  if (info->lastpos == HA_OFFSET_ERROR && info->update & HA_STATE_PREV_FOUND)
35
36
    flag=0;                                     /* Read first */
36
37
 
37
38
  if (fast_mi_readinfo(info))
38
 
    return(my_errno);
 
39
    DBUG_RETURN(my_errno);
39
40
  if (info->s->concurrent_insert)
40
41
    rw_rdlock(&info->s->key_root_lock[inx]);
41
42
  changed=_mi_test_if_changed(info);
84
85
      if (info->s->concurrent_insert)
85
86
        rw_unlock(&info->s->key_root_lock[inx]);
86
87
      info->lastpos= HA_OFFSET_ERROR;
87
 
      return(my_errno= HA_ERR_END_OF_FILE);
 
88
      DBUG_RETURN(my_errno= HA_ERR_END_OF_FILE);
88
89
    }
89
90
  }
90
91
  
102
103
  }
103
104
  else if (!buf)
104
105
  {
105
 
    return(info->lastpos==HA_OFFSET_ERROR ? my_errno : 0);
 
106
    DBUG_RETURN(info->lastpos==HA_OFFSET_ERROR ? my_errno : 0);
106
107
  }
107
108
  else if (!(*info->read_record)(info,info->lastpos,buf))
108
109
  {
109
110
    info->update|= HA_STATE_AKTIV;              /* Record is read */
110
 
    return(0);
 
111
    DBUG_RETURN(0);
111
112
  }
112
 
  return(my_errno);
 
113
  DBUG_PRINT("error",("Got error: %d,  errno: %d",error, my_errno));
 
114
  DBUG_RETURN(my_errno);
113
115
} /* mi_rnext */