~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/timestamp.h

Merged in changes from Andrey.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
1
/* - mode: c++ c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
4
 *  Copyright (C) 2008 MySQL
23
23
 
24
24
class Field_timestamp :public Field_str {
25
25
public:
26
 
  Field_timestamp(uchar *ptr_arg, uint32_t len_arg,
27
 
                  uchar *null_ptr_arg, uchar null_bit_arg,
 
26
  Field_timestamp(unsigned char *ptr_arg, uint32_t len_arg,
 
27
                  unsigned char *null_ptr_arg, unsigned char null_bit_arg,
28
28
                  enum utype unireg_check_arg, const char *field_name_arg,
29
29
                  TABLE_SHARE *share, const CHARSET_INFO * const cs);
30
30
  Field_timestamp(bool maybe_null_arg, const char *field_name_arg,
32
32
  enum_field_types type() const { return DRIZZLE_TYPE_TIMESTAMP;}
33
33
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
34
34
  enum Item_result cmp_type () const { return INT_RESULT; }
35
 
  int  store(const char *to,uint length, const CHARSET_INFO * const charset);
 
35
  int  store(const char *to,uint32_t length, const CHARSET_INFO * const charset);
36
36
  int  store(double nr);
37
37
  int  store(int64_t nr, bool unsigned_val);
38
38
  int  reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; return 0; }
40
40
  int64_t val_int(void);
41
41
  String *val_str(String*,String *);
42
42
  bool send_binary(Protocol *protocol);
43
 
  int cmp(const uchar *,const uchar *);
44
 
  void sort_string(uchar *buff,uint length);
 
43
  int cmp(const unsigned char *,const unsigned char *);
 
44
  void sort_string(unsigned char *buff,uint32_t length);
45
45
  uint32_t pack_length() const { return 4; }
46
46
  void sql_type(String &str) const;
47
47
  bool can_be_compared_as_int64_t() const { return true; }
79
79
#endif
80
80
      longstore(ptr,(uint32_t) timestamp);
81
81
  }
82
 
  bool get_date(DRIZZLE_TIME *ltime,uint fuzzydate);
 
82
  bool get_date(DRIZZLE_TIME *ltime,uint32_t fuzzydate);
83
83
  bool get_time(DRIZZLE_TIME *ltime);
84
84
  timestamp_auto_set_type get_auto_set_type() const;
85
85
};