~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_rnext.c

  • Committer: Monty Taylor
  • Date: 2008-08-16 21:06:22 UTC
  • Revision ID: monty@inaugust.com-20080816210622-zpnn13unyinqzn72
Updated po files.

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
 
int heap_rnext(HP_INFO *info, unsigned char *record)
 
20
int heap_rnext(HP_INFO *info, uchar *record)
23
21
{
24
 
  unsigned char *pos;
 
22
  uchar *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),
80
 
             sizeof(unsigned char*));
 
77
      memcpy(&pos, pos + (*keyinfo->get_key_length)(keyinfo, pos), 
 
78
             sizeof(uchar*));
81
79
      info->current_ptr = pos;
82
80
    }
83
81
    else