837
class Field_medium :public Field_num {
839
Field_medium(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
841
enum utype unireg_check_arg, const char *field_name_arg,
842
bool zero_arg, bool unsigned_arg)
843
:Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
844
unireg_check_arg, field_name_arg,
845
0, zero_arg,unsigned_arg)
847
enum Item_result result_type () const { return INT_RESULT; }
848
enum_field_types type() const { return MYSQL_TYPE_INT24;}
849
enum ha_base_keytype key_type() const
850
{ return unsigned_flag ? HA_KEYTYPE_UINT24 : HA_KEYTYPE_INT24; }
851
int store(const char *to,uint length,CHARSET_INFO *charset);
852
int store(double nr);
853
int store(longlong nr, bool unsigned_val);
854
int reset(void) { ptr[0]=ptr[1]=ptr[2]=0; return 0; }
855
double val_real(void);
856
longlong val_int(void);
857
String *val_str(String*,String *);
858
bool send_binary(Protocol *protocol);
859
int cmp(const uchar *,const uchar *);
860
void sort_string(uchar *buff,uint length);
861
uint32 pack_length() const { return 3; }
862
void sql_type(String &str) const;
863
uint32 max_display_length() { return 8; }
865
virtual uchar *pack(uchar* to, const uchar *from,
866
uint max_length, bool low_byte_first)
868
return Field::pack(to, from, max_length, low_byte_first);
871
virtual const uchar *unpack(uchar* to, const uchar *from,
872
uint param_data, bool low_byte_first)
874
return Field::unpack(to, from, param_data, low_byte_first);
879
837
class Field_long :public Field_num {
881
839
Field_long(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,