~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/field.h

  • Committer: Brian Aker
  • Date: 2008-07-06 15:56:24 UTC
  • Revision ID: brian@tangent.org-20080706155624-pn6a48azmjh6nalx
Most of the removal of dead DECIMAL type

Show diffs side-by-side

added added

removed removed

Lines of Context:
666
666
};
667
667
 
668
668
 
669
 
class Field_decimal :public Field_real {
670
 
public:
671
 
  Field_decimal(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
672
 
                uchar null_bit_arg,
673
 
                enum utype unireg_check_arg, const char *field_name_arg,
674
 
                uint8 dec_arg,bool zero_arg,bool unsigned_arg)
675
 
    :Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
676
 
                unireg_check_arg, field_name_arg,
677
 
                dec_arg, zero_arg, unsigned_arg)
678
 
    {}
679
 
  enum_field_types type() const { return MYSQL_TYPE_DECIMAL;}
680
 
  enum ha_base_keytype key_type() const
681
 
  { return zerofill ? HA_KEYTYPE_BINARY : HA_KEYTYPE_NUM; }
682
 
  int reset(void);
683
 
  int store(const char *to,uint length,CHARSET_INFO *charset);
684
 
  int store(double nr);
685
 
  int store(longlong nr, bool unsigned_val);
686
 
  double val_real(void);
687
 
  longlong val_int(void);
688
 
  String *val_str(String*,String *);
689
 
  int cmp(const uchar *,const uchar *);
690
 
  void sort_string(uchar *buff,uint length);
691
 
  void overflow(bool negative);
692
 
  bool zero_pack() const { return 0; }
693
 
  void sql_type(String &str) const;
694
 
  virtual const uchar *unpack(uchar* to, const uchar *from,
695
 
                              uint param_data, bool low_byte_first)
696
 
  {
697
 
    return Field::unpack(to, from, param_data, low_byte_first);
698
 
  }
699
 
  virtual uchar *pack(uchar* to, const uchar *from,
700
 
                      uint max_length, bool low_byte_first)
701
 
  {
702
 
    return Field::pack(to, from, max_length, low_byte_first);
703
 
  }
704
 
};
705
 
 
706
 
 
707
669
/* New decimal/numeric field which use fixed point arithmetic */
708
670
class Field_new_decimal :public Field_num {
709
671
private: