~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.cc

Dead code removal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
406
406
  return pack_length();
407
407
}
408
408
 
409
 
uint32_t Field::pack_length_from_metadata(uint32_t field_metadata)
410
 
{
411
 
  return field_metadata;
412
 
}
413
 
 
414
 
uint32_t Field::row_pack_length()
415
 
{
416
 
  return 0;
417
 
}
418
 
 
419
409
uint32_t Field::data_length()
420
410
{
421
411
  return pack_length();
596
586
  table_name= &table_arg->alias;
597
587
}
598
588
 
599
 
String *Field::val_int_as_str(String *val_buffer, bool unsigned_val)
600
 
{
601
 
  const CHARSET_INFO * const cs= &my_charset_bin;
602
 
  uint32_t length;
603
 
  int64_t value= val_int();
604
 
 
605
 
  if (val_buffer->alloc(MY_INT64_NUM_DECIMAL_DIGITS))
606
 
    return 0;
607
 
  length= (uint32_t) (*cs->cset->int64_t10_to_str)(cs, (char*) val_buffer->ptr(),
608
 
                                                MY_INT64_NUM_DECIMAL_DIGITS,
609
 
                                                unsigned_val ? 10 : -10,
610
 
                                                value);
611
 
  val_buffer->length(length);
612
 
  return val_buffer;
613
 
}
614
 
 
615
589
/// This is used as a table name when the table structure is not set up
616
590
Field::Field(unsigned char *ptr_arg,
617
591
             uint32_t length_arg,
667
641
  }
668
642
}
669
643
 
670
 
int Field::compatible_field_size(uint32_t field_metadata)
671
 
{
672
 
  uint32_t const source_size= pack_length_from_metadata(field_metadata);
673
 
  uint32_t const destination_size= row_pack_length();
674
 
  return (source_size <= destination_size);
675
 
}
676
 
 
677
644
int Field::store(const char *to, 
678
645
                 uint32_t length,
679
646
                 const CHARSET_INFO * const cs,