~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_rfirst.c

  • Committer: Brian Aker
  • Date: 2008-09-04 19:31:00 UTC
  • Revision ID: brian@tangent.org-20080904193100-l849hgghfy4urj43
Changing default character set from this point on.

Show diffs side-by-side

added added

removed removed

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