~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/hp_rkey.c

  • Committer: Jay Pipes
  • Date: 2008-07-16 16:14:22 UTC
  • mto: This revision was merged to the branch mainline in revision 182.
  • Revision ID: jay@mysql.com-20080716161422-fy1bl8o5q7m8kglq
Removed all DBUG symbols from heap storage engine

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
  uchar *pos;
22
22
  HP_SHARE *share= info->s;
23
23
  HP_KEYDEF *keyinfo= share->keydef + inx;
24
 
  DBUG_ENTER("heap_rkey");
25
 
  DBUG_PRINT("enter",("info: 0x%lx  inx: %d", (long) info, inx));
26
24
 
27
25
  if ((uint) inx >= share->keys)
28
26
  {
29
 
    DBUG_RETURN(my_errno= HA_ERR_WRONG_INDEX);
 
27
    return(my_errno= HA_ERR_WRONG_INDEX);
30
28
  }
31
29
  info->lastinx= inx;
32
30
  info->current_record= (ulong) ~0L;            /* For heap_rrnd() */
51
49
                               &info->last_pos, find_flag, &custom_arg)))
52
50
    {
53
51
      info->update= 0;
54
 
      DBUG_RETURN(my_errno= HA_ERR_KEY_NOT_FOUND);
 
52
      return(my_errno= HA_ERR_KEY_NOT_FOUND);
55
53
    }
56
54
    memcpy(&pos, pos + (*keyinfo->get_key_length)(keyinfo, pos), sizeof(uchar*));
57
55
    info->current_ptr= pos;
61
59
    if (!(pos= hp_search(info, share->keydef + inx, key, 0)))
62
60
    {
63
61
      info->update= 0;
64
 
      DBUG_RETURN(my_errno);
 
62
      return(my_errno);
65
63
    }
66
64
    if (!(keyinfo->flag & HA_NOSAME))
67
65
      memcpy(info->lastkey, key, (size_t) keyinfo->length);
68
66
  }
69
67
  memcpy(record, pos, (size_t) share->reclength);
70
68
  info->update= HA_STATE_AKTIV;
71
 
  DBUG_RETURN(0);
 
69
  return(0);
72
70
}
73
71
 
74
72