~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_rkey.c

  • Committer: Monty Taylor
  • Date: 2008-09-15 17:24:04 UTC
  • Revision ID: monty@inaugust.com-20080915172404-ygh6hiyu0q7qpa9x
Removed strndup calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
        /* Read a record using key */
21
21
        /* Ordinary search_flag is 0 ; Give error if no record with key */
22
22
 
23
 
int mi_rkey(MI_INFO *info, unsigned char *buf, int inx, const unsigned char *key,
 
23
int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key,
24
24
            key_part_map keypart_map, enum ha_rkey_function search_flag)
25
25
{
26
 
  unsigned char *key_buff;
 
26
  uchar *key_buff;
27
27
  MYISAM_SHARE *share=info->s;
28
28
  MI_KEYDEF *keyinfo;
29
29
  HA_KEYSEG *last_used_keyseg;
30
 
  uint32_t pack_key_length, use_key_length, nextflag;
31
 
  uint32_t myisam_search_flag;
 
30
  uint pack_key_length, use_key_length, nextflag;
 
31
  uint myisam_search_flag;
32
32
  int res= 0;
33
33
 
34
34
  if ((inx = _mi_check_index(info,inx)) < 0)
55
55
    assert(keypart_map);
56
56
    /* Save the packed key for later use in the second buffer of lastkey. */
57
57
    key_buff=info->lastkey+info->s->base.max_key_length;
58
 
    pack_key_length=_mi_pack_key(info,(uint) inx, key_buff, (unsigned char*) key,
 
58
    pack_key_length=_mi_pack_key(info,(uint) inx, key_buff, (uchar*) key,
59
59
                                 keypart_map, &last_used_keyseg);
60
60
    /* Save packed_key_length for use by the MERGE engine. */
61
61
    info->pack_key_length= pack_key_length;
104
104
             (info->index_cond_func && 
105
105
              !(res= mi_check_index_cond(info, inx, buf))))
106
106
      {
107
 
        uint32_t not_used[2];
 
107
        uint not_used[2];
108
108
        /*
109
109
          Skip rows that are inserted by other threads since we got a lock
110
110
          Note that this can only happen if we are not searching after an