~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_rnext_same.cc

  • Committer: Monty Taylor
  • Date: 2009-12-23 08:01:21 UTC
  • mto: This revision was merged to the branch mainline in revision 1253.
  • Revision ID: mordred@inaugust.com-20091223080121-iveugdrewkp7iqyi
Oy. Bigger change than I normally like - but this stuff is all intertwined.
Moved a bunch of things to public drizzled/ area. Split some files. Made some
convenience libs. EVENTUALLY, some of this will be able to be re-factored, but
for now I'm ok with erring on the side of too many files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
  MI_KEYDEF *keyinfo;
31
31
 
32
32
  if ((int) (inx=info->lastinx) < 0 || info->lastpos == HA_OFFSET_ERROR)
33
 
    return(my_errno=HA_ERR_WRONG_INDEX);
 
33
    return(errno=HA_ERR_WRONG_INDEX);
34
34
  keyinfo=info->s->keyinfo+inx;
35
35
  if (fast_mi_readinfo(info))
36
 
    return(my_errno);
 
36
    return(errno);
37
37
 
38
38
  if (info->s->concurrent_insert)
39
39
    pthread_rwlock_rdlock(&info->s->key_root_lock[inx]);
57
57
                       info->last_rkey_length, SEARCH_FIND, not_used))
58
58
        {
59
59
          error=1;
60
 
          my_errno=HA_ERR_END_OF_FILE;
 
60
          errno=HA_ERR_END_OF_FILE;
61
61
          info->lastpos= HA_OFFSET_ERROR;
62
62
          break;
63
63
        }
75
75
 
76
76
  if (error)
77
77
  {
78
 
    if (my_errno == HA_ERR_KEY_NOT_FOUND)
79
 
      my_errno=HA_ERR_END_OF_FILE;
 
78
    if (errno == HA_ERR_KEY_NOT_FOUND)
 
79
      errno=HA_ERR_END_OF_FILE;
80
80
  }
81
81
  else if (!buf)
82
82
  {
83
 
    return(info->lastpos==HA_OFFSET_ERROR ? my_errno : 0);
 
83
    return(info->lastpos==HA_OFFSET_ERROR ? errno : 0);
84
84
  }
85
85
  else if (!(*info->read_record)(info,info->lastpos,buf))
86
86
  {
87
87
    info->update|= HA_STATE_AKTIV;              /* Record is read */
88
88
    return(0);
89
89
  }
90
 
  return(my_errno);
 
90
  return(errno);
91
91
} /* mi_rnext_same */