~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_key.c

  • Committer: Brian Aker
  • Date: 2008-08-05 04:10:42 UTC
  • mfrom: (261.2.8 codestyle)
  • mto: This revision was merged to the branch mainline in revision 263.
  • Revision ID: brian@tangent.org-20080805041042-1l4893r3bwy2lxz2
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
        *key++= bits;
86
86
        length--;
87
87
      }
88
 
      memcpy((uchar*) key, pos, length);
 
88
      memcpy(key, pos, length);
89
89
      key+= length;
90
90
      continue;
91
91
    }
104
104
      }
105
105
      FIX_LENGTH(cs, pos, length, char_length);
106
106
      store_key_length_inc(key,char_length);
107
 
      memcpy((uchar*) key,(uchar*) pos,(size_t) char_length);
 
107
      memcpy(key, pos, char_length);
108
108
      key+=char_length;
109
109
      continue;
110
110
    }
117
117
      set_if_smaller(length,tmp_length);
118
118
      FIX_LENGTH(cs, pos, length, char_length);
119
119
      store_key_length_inc(key,char_length);
120
 
      memcpy((uchar*) key,(uchar*) pos,(size_t) char_length);
 
120
      memcpy(key, pos, char_length);
121
121
      key+= char_length;
122
122
      continue;
123
123
    }
124
124
    else if (keyseg->flag & HA_BLOB_PART)
125
125
    {
126
126
      uint tmp_length=_mi_calc_blob_length(keyseg->bit_start,pos);
127
 
      memcpy((uchar*) &pos,pos+keyseg->bit_start,sizeof(char*));
 
127
      memcpy(&pos, pos+keyseg->bit_start, sizeof(char*));
128
128
      set_if_smaller(length,tmp_length);
129
129
      FIX_LENGTH(cs, pos, length, char_length);
130
130
      store_key_length_inc(key,char_length);
131
 
      memcpy((uchar*) key,(uchar*) pos,(size_t) char_length);
 
131
      memcpy(key, pos, char_length);
132
132
      key+= char_length;
133
133
      continue;
134
134
    }
167
167
      continue;
168
168
    }
169
169
    FIX_LENGTH(cs, pos, length, char_length);
170
 
    memcpy((uchar*) key, pos, char_length);
 
170
    memcpy(key, pos, char_length);
171
171
    if (length > char_length)
172
172
      cs->cset->fill(cs, (char*) key+char_length, length-char_length, ' ');
173
173
    key+= length;
240
240
      length=(uint) (end-pos);
241
241
      FIX_LENGTH(cs, pos, length, char_length);
242
242
      store_key_length_inc(key,char_length);
243
 
      memcpy((uchar*) key,pos,(size_t) char_length);
 
243
      memcpy(key, pos, char_length);
244
244
      key+= char_length;
245
245
      continue;
246
246
    }
253
253
      FIX_LENGTH(cs, pos, length, char_length);
254
254
      store_key_length_inc(key,char_length);
255
255
      old+=2;                                   /* Skip length */
256
 
      memcpy((uchar*) key, pos,(size_t) char_length);
 
256
      memcpy(key, pos, char_length);
257
257
      key+= char_length;
258
258
      continue;
259
259
    }
265
265
      continue;
266
266
    }
267
267
    FIX_LENGTH(cs, pos, length, char_length);
268
 
    memcpy((uchar*) key, pos, char_length);
 
268
    memcpy(key, pos, char_length);
269
269
    if (length > char_length)
270
270
      cs->cset->fill(cs, (char*) key+char_length, length-char_length, ' ');
271
271
    key+= length;
335
335
        clr_rec_bits(record + keyseg->bit_pos, keyseg->bit_start,
336
336
                     keyseg->bit_length);
337
337
      }
338
 
      memcpy(record + keyseg->start, (uchar*) key, length);
 
338
      memcpy(record + keyseg->start, key, length);
339
339
      key+= length;
340
340
      continue;
341
341
    }
350
350
      pos= record+keyseg->start;
351
351
      if (keyseg->type != (int) HA_KEYTYPE_NUM)
352
352
      {
353
 
        memcpy(pos,key,(size_t) length);
 
353
        memcpy(pos, key, length);
354
354
        keyseg->charset->cset->fill(keyseg->charset,
355
355
                                    (char*) pos + length,
356
356
                                    keyseg->length - length,
359
359
      else
360
360
      {
361
361
        memset(pos, ' ', keyseg->length-length);
362
 
        memcpy(pos+keyseg->length-length,key,(size_t) length);
 
362
        memcpy(pos+keyseg->length-length, key, length);
363
363
      }
364
364
      key+=length;
365
365
      continue;
379
379
      else
380
380
        int2store(record+keyseg->start, length);
381
381
      /* And key data */
382
 
      memcpy(record+keyseg->start + keyseg->bit_start, (uchar*) key, length);
 
382
      memcpy(record+keyseg->start + keyseg->bit_start, key, length);
383
383
      key+= length;
384
384
    }
385
385
    else if (keyseg->flag & HA_BLOB_PART)
391
391
        goto err;
392
392
#endif
393
393
      memcpy(record+keyseg->start+keyseg->bit_start,
394
 
             (char*) &blob_ptr,sizeof(char*));
 
394
             &blob_ptr,sizeof(char*));
395
395
      memcpy(blob_ptr,key,length);
396
396
      blob_ptr+=length;
397
397
 
422
422
      if (key+keyseg->length > key_end)
423
423
        goto err;
424
424
#endif
425
 
      memcpy(record+keyseg->start,(uchar*) key,
426
 
             (size_t) keyseg->length);
 
425
      memcpy(record+keyseg->start, key, keyseg->length);
427
426
      key+= keyseg->length;
428
427
    }
429
428
  }