~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_rsamepos.c

  • Committer: Brian Aker
  • Date: 2008-07-13 21:20:24 UTC
  • Revision ID: brian@tangent.org-20080713212024-o6263c1vha7yxdeu
More bool removal. More cow bell!

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
/* As mi_rsame but supply a position */
18
18
 
19
19
#include "myisamdef.h"
20
 
#include <drizzled/util/test.h>
21
 
 
22
20
 
23
21
 
24
22
        /*
29
27
        ** HA_ERR_END_OF_FILE   = End of file
30
28
        */
31
29
 
32
 
int mi_rsame_with_pos(MI_INFO *info, unsigned char *record, int inx, my_off_t filepos)
 
30
int mi_rsame_with_pos(MI_INFO *info, uchar *record, int inx, my_off_t filepos)
33
31
{
 
32
  DBUG_ENTER("mi_rsame_with_pos");
 
33
  DBUG_PRINT("enter",("index: %d  filepos: %ld", inx, (long) filepos));
 
34
 
34
35
  if (inx < -1 ||
35
36
      (inx >= 0 && ! mi_is_key_active(info->s->state.key_map, inx)))
36
37
  {
37
 
    return(my_errno=HA_ERR_WRONG_INDEX);
 
38
    DBUG_RETURN(my_errno=HA_ERR_WRONG_INDEX);
38
39
  }
39
40
 
40
41
  info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
42
43
  {
43
44
    if (my_errno == HA_ERR_RECORD_DELETED)
44
45
      my_errno=HA_ERR_KEY_NOT_FOUND;
45
 
    return(my_errno);
 
46
    DBUG_RETURN(my_errno);
46
47
  }
47
48
  info->lastpos=filepos;
48
49
  info->lastinx=inx;
52
53
                                      info->lastpos);
53
54
    info->update|=HA_STATE_KEY_CHANGED;         /* Don't use indexposition */
54
55
  }
55
 
  return(0);
 
56
  DBUG_RETURN(0);
56
57
} /* mi_rsame_pos */