~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field_conv.cc

  • Committer: Brian Aker
  • Date: 2011-03-28 02:46:21 UTC
  • Revision ID: brian@tangent.org-20110328024621-wtkdtlvdplqm0ybf
Shift CHARSET_INFO to charset_info_st

Show diffs side-by-side

added added

removed removed

Lines of Context:
387
387
 
388
388
static void do_cut_string(CopyField *copy)
389
389
{
390
 
  const CHARSET_INFO * const cs= copy->from_field->charset();
 
390
  const charset_info_st * const cs= copy->from_field->charset();
391
391
  memcpy(copy->to_ptr, copy->from_ptr, copy->to_length);
392
392
 
393
393
  /* Check if we loosed any important characters */
410
410
static void do_cut_string_complex(CopyField *copy)
411
411
{                                               // Shorter string field
412
412
  int well_formed_error;
413
 
  const CHARSET_INFO * const cs= copy->from_field->charset();
 
413
  const charset_info_st * const cs= copy->from_field->charset();
414
414
  const unsigned char *from_end= copy->from_ptr + copy->from_length;
415
415
  uint32_t copy_length= cs->cset->well_formed_len(cs,
416
416
                                              (char*) copy->from_ptr,
441
441
 
442
442
static void do_expand_binary(CopyField *copy)
443
443
{
444
 
  const CHARSET_INFO * const cs= copy->from_field->charset();
 
444
  const charset_info_st * const cs= copy->from_field->charset();
445
445
  memcpy(copy->to_ptr, copy->from_ptr, copy->from_length);
446
446
  cs->cset->fill(cs, (char*) copy->to_ptr+copy->from_length,
447
447
                 copy->to_length-copy->from_length, '\0');
451
451
 
452
452
static void do_expand_string(CopyField *copy)
453
453
{
454
 
  const CHARSET_INFO * const cs= copy->from_field->charset();
 
454
  const charset_info_st * const cs= copy->from_field->charset();
455
455
  memcpy(copy->to_ptr,copy->from_ptr,copy->from_length);
456
456
  cs->cset->fill(cs, (char*) copy->to_ptr+copy->from_length,
457
457
                 copy->to_length-copy->from_length, ' ');
478
478
static void do_varstring1_mb(CopyField *copy)
479
479
{
480
480
  int well_formed_error;
481
 
  const CHARSET_INFO * const cs= copy->from_field->charset();
 
481
  const charset_info_st * const cs= copy->from_field->charset();
482
482
  uint32_t from_length= (uint32_t) *(unsigned char*) copy->from_ptr;
483
483
  const unsigned char *from_ptr= copy->from_ptr + 1;
484
484
  uint32_t to_char_length= (copy->to_length - 1) / cs->mbmaxlen;
519
519
static void do_varstring2_mb(CopyField *copy)
520
520
{
521
521
  int well_formed_error;
522
 
  const CHARSET_INFO * const cs= copy->from_field->charset();
 
522
  const charset_info_st * const cs= copy->from_field->charset();
523
523
  uint32_t char_length= (copy->to_length - HA_KEY_BLOB_LENGTH) / cs->mbmaxlen;
524
524
  uint32_t from_length= uint2korr(copy->from_ptr);
525
525
  const unsigned char *from_beg= copy->from_ptr + HA_KEY_BLOB_LENGTH;