~mordred/drizzle/fix-bell-bugs

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_rprev.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
  MYISAM_SHARE *share=info->s;
30
30
 
31
31
  if ((inx = _mi_check_index(info,inx)) < 0)
32
 
    return(my_errno);
 
32
    return(errno);
33
33
  flag=SEARCH_SMALLER;                          /* Read previous */
34
34
  if (info->lastpos == HA_OFFSET_ERROR && info->update & HA_STATE_NEXT_FOUND)
35
35
    flag=0;                                     /* Read last */
36
36
 
37
37
  if (fast_mi_readinfo(info))
38
 
    return(my_errno);
 
38
    return(errno);
39
39
  changed=_mi_test_if_changed(info);
40
40
  if (share->concurrent_insert)
41
41
    pthread_rwlock_rdlock(&share->key_root_lock[inx]);
70
70
  info->update|= HA_STATE_PREV_FOUND;
71
71
  if (error)
72
72
  {
73
 
    if (my_errno == HA_ERR_KEY_NOT_FOUND)
74
 
      my_errno=HA_ERR_END_OF_FILE;
 
73
    if (errno == HA_ERR_KEY_NOT_FOUND)
 
74
      errno=HA_ERR_END_OF_FILE;
75
75
  }
76
76
  else if (!buf)
77
77
  {
78
 
    return(info->lastpos==HA_OFFSET_ERROR ? my_errno : 0);
 
78
    return(info->lastpos==HA_OFFSET_ERROR ? errno : 0);
79
79
  }
80
80
  else if (!(*info->read_record)(info,info->lastpos,buf))
81
81
  {
82
82
    info->update|= HA_STATE_AKTIV;              /* Record is read */
83
83
    return(0);
84
84
  }
85
 
  return(my_errno);
 
85
  return(errno);
86
86
} /* mi_rprev */