~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_rnext.c

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
#include "heapdef.h"
17
17
 
18
 
#include <string.h>
19
 
 
20
18
/* Read next record with the same key */
21
19
 
22
20
int heap_rnext(HP_INFO *info, unsigned char *record)
24
22
  unsigned char *pos;
25
23
  HP_SHARE *share=info->s;
26
24
  HP_KEYDEF *keyinfo;
27
 
 
 
25
  
28
26
  if (info->lastinx < 0)
29
27
    return(my_errno=HA_ERR_WRONG_INDEX);
30
28
 
71
69
      custom_arg.keyseg = keyinfo->seg;
72
70
      custom_arg.key_length = info->lastkey_len;
73
71
      custom_arg.search_flag = SEARCH_SAME | SEARCH_FIND;
74
 
      pos = tree_search_key(&keyinfo->rb_tree, info->lastkey, info->parents,
 
72
      pos = tree_search_key(&keyinfo->rb_tree, info->lastkey, info->parents, 
75
73
                           &info->last_pos, info->last_find_flag, &custom_arg);
76
74
    }
77
75
    if (pos)
78
76
    {
79
 
      memcpy(&pos, pos + (*keyinfo->get_key_length)(keyinfo, pos),
 
77
      memcpy(&pos, pos + (*keyinfo->get_key_length)(keyinfo, pos), 
80
78
             sizeof(unsigned char*));
81
79
      info->current_ptr = pos;
82
80
    }