~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/enum.h

  • Committer: lbieber
  • Date: 2010-09-22 05:33:53 UTC
  • mfrom: (1771.3.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 1785.
  • Revision ID: lbieber@orisndriz08-20100922053353-v0ys6dgdq07cg08q
Merge Paul M. - latest changes from PBXT 1.0.11-7

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
class Field_enum :public Field_str
30
30
{
 
31
protected:
 
32
  uint32_t packlength;
31
33
public:
32
34
 
33
35
  using Field::store;
44
46
             unsigned char *null_ptr_arg,
45
47
             unsigned char null_bit_arg,
46
48
             const char *field_name_arg,
 
49
             uint32_t packlength_arg,
47
50
             TYPELIB *typelib_arg,
48
51
             const CHARSET_INFO * const charset_arg)
49
52
    :Field_str(ptr_arg,
52
55
               null_bit_arg,
53
56
                     field_name_arg,
54
57
               charset_arg),
 
58
    packlength(packlength_arg),
55
59
    typelib(typelib_arg)
56
60
  {
57
61
    flags|= ENUM_FLAG;
58
62
  }
59
63
  Field *new_field(memory::Root *root, Table *new_table, bool keep_type);
60
 
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
 
64
  enum ha_base_keytype key_type() const;
61
65
  int  store(const char *to, uint32_t length, const CHARSET_INFO * const);
62
66
  int  store(double nr);
63
67
  int  store(int64_t nr, bool unsigned_val);
81
85
  {
82
86
    return INT_RESULT;
83
87
  }
84
 
  uint32_t pack_length() const { return 4; }
 
88
  uint32_t pack_length() const
 
89
  {
 
90
    return (uint32_t) packlength;
 
91
  }
85
92
  uint32_t size_of() const
86
93
  {
87
94
    return sizeof(*this);