~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_rsamepos.c

  • Committer: Monty Taylor
  • Date: 2008-10-16 06:32:30 UTC
  • mto: (511.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 521.
  • Revision ID: monty@inaugust.com-20081016063230-4brxsra0qsmsg84q
Added -Wunused-macros.

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