~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_rnext.c

Removed/replaced DBUG

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