~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_rlast.c

  • Committer: Stewart Smith
  • Date: 2008-07-13 08:00:16 UTC
  • mto: (210.1.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 211.
  • Revision ID: stewart@flamingspork.com-20080713080016-8qtjv9ypt42azzr6
CRC32() as UDF

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
  HP_SHARE *share=    info->s;
24
24
  HP_KEYDEF *keyinfo= share->keydef + inx;
25
25
 
 
26
  DBUG_ENTER("heap_rlast");
26
27
  info->lastinx= inx;
27
28
  if (keyinfo->algorithm == HA_KEY_ALG_BTREE)
28
29
  {
34
35
      memcpy(&pos, pos + (*keyinfo->get_key_length)(keyinfo, pos), 
35
36
             sizeof(uchar*));
36
37
      info->current_ptr = pos;
37
 
      hp_extract_record(share, record, pos);
 
38
      memcpy(record, pos, (size_t)share->reclength);
38
39
      info->update = HA_STATE_AKTIV;
39
40
    }
40
41
    else
41
42
    {
42
43
      my_errno = HA_ERR_END_OF_FILE;
43
 
      return(my_errno);
 
44
      DBUG_RETURN(my_errno);
44
45
    }
45
 
    return(0);
 
46
    DBUG_RETURN(0);
46
47
  }
47
48
  else
48
49
  {
49
50
    info->current_ptr=0;
50
51
    info->current_hash_ptr=0;
51
52
    info->update=HA_STATE_NEXT_FOUND;
52
 
    return(heap_rprev(info,record));
 
53
    DBUG_RETURN(heap_rprev(info,record));
53
54
  }
54
55
}