~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_rprev.c

  • Committer: Monty Taylor
  • Date: 2008-07-16 19:10:24 UTC
  • mfrom: (51.1.127 remove-dbug)
  • mto: This revision was merged to the branch mainline in revision 176.
  • Revision ID: monty@inaugust.com-20080716191024-prjgoh7fbri7rx26
MergedĀ fromĀ remove-dbug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
  int error,changed;
28
28
  register uint flag;
29
29
  MYISAM_SHARE *share=info->s;
30
 
  DBUG_ENTER("mi_rprev");
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_SMALLER;                          /* Read previous */
35
34
  if (info->lastpos == HA_OFFSET_ERROR && info->update & HA_STATE_NEXT_FOUND)
36
35
    flag=0;                                     /* Read last */
37
36
 
38
37
  if (fast_mi_readinfo(info))
39
 
    DBUG_RETURN(my_errno);
 
38
    return(my_errno);
40
39
  changed=_mi_test_if_changed(info);
41
40
  if (share->concurrent_insert)
42
41
    rw_rdlock(&share->key_root_lock[inx]);
76
75
  }
77
76
  else if (!buf)
78
77
  {
79
 
    DBUG_RETURN(info->lastpos==HA_OFFSET_ERROR ? my_errno : 0);
 
78
    return(info->lastpos==HA_OFFSET_ERROR ? my_errno : 0);
80
79
  }
81
80
  else if (!(*info->read_record)(info,info->lastpos,buf))
82
81
  {
83
82
    info->update|= HA_STATE_AKTIV;              /* Record is read */
84
 
    DBUG_RETURN(0);
 
83
    return(0);
85
84
  }
86
 
  DBUG_RETURN(my_errno);
 
85
  return(my_errno);
87
86
} /* mi_rprev */