~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_rlast.c

  • Committer: Brian Aker
  • Date: 2008-11-04 15:39:09 UTC
  • mfrom: (575.1.2 devel)
  • Revision ID: brian@tangent.org-20081104153909-c72hn65udxs1ccal
Merge of Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
        /* Read first record with the current key */
19
19
 
20
20
 
21
 
int heap_rlast(HP_INFO *info, uchar *record, int inx)
 
21
int heap_rlast(HP_INFO *info, unsigned char *record, int inx)
22
22
{
23
23
  HP_SHARE *share=    info->s;
24
24
  HP_KEYDEF *keyinfo= share->keydef + inx;
26
26
  info->lastinx= inx;
27
27
  if (keyinfo->algorithm == HA_KEY_ALG_BTREE)
28
28
  {
29
 
    uchar *pos;
 
29
    unsigned char *pos;
30
30
 
31
31
    if ((pos = tree_search_edge(&keyinfo->rb_tree, info->parents,
32
32
                                &info->last_pos, offsetof(TREE_ELEMENT, right))))
33
33
    {
34
34
      memcpy(&pos, pos + (*keyinfo->get_key_length)(keyinfo, pos), 
35
 
             sizeof(uchar*));
 
35
             sizeof(unsigned char*));
36
36
      info->current_ptr = pos;
37
37
      hp_extract_record(share, record, pos);
38
38
      info->update = HA_STATE_AKTIV;