~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/blob.h

  • Committer: Mark Atwood
  • Date: 2011-08-12 04:08:33 UTC
  • mfrom: (2385.2.17 refactor5)
  • Revision ID: me@mark.atwood.name-20110812040833-u6j85nc6ahuc0dtz
mergeĀ lp:~olafvdspek/drizzle/refactor5

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
  void set_key_image(const unsigned char *buff,uint32_t length);
158
158
  inline void copy()
159
159
  {
160
 
    unsigned char* tmp= get_ptr();
161
 
    value.copy((char*) tmp, get_length(), charset());
162
 
    tmp=(unsigned char*) value.ptr();
163
 
    memcpy(ptr+sizeof(uint32_t),&tmp,sizeof(char*));
 
160
    value.copy((char*)get_ptr(), get_length(), charset());
 
161
    char* tmp= value.ptr();
 
162
    memcpy(ptr + sizeof(uint32_t), &tmp, sizeof(char*));
164
163
  }
165
 
  virtual unsigned char *pack(unsigned char *to, const unsigned char *from,
166
 
                      uint32_t max_length, bool low_byte_first);
167
 
  unsigned char *pack_key(unsigned char *to, const unsigned char *from,
168
 
                  uint32_t max_length, bool low_byte_first);
169
 
  virtual const unsigned char *unpack(unsigned char *to, const unsigned char *from,
170
 
                              uint32_t , bool low_byte_first);
 
164
  virtual unsigned char *pack(unsigned char *to, const unsigned char *from, uint32_t max_length, bool low_byte_first);
 
165
  unsigned char *pack_key(unsigned char *to, const unsigned char *from, uint32_t max_length, bool low_byte_first);
 
166
  virtual const unsigned char *unpack(unsigned char *to, const unsigned char *from, uint32_t , bool low_byte_first);
171
167
  void free() { value.free(); }
172
 
  inline void clear_temporary() { memset(&value, 0, sizeof(value)); }
173
168
  friend int field_conv(Field *to,Field *from);
174
169
  uint32_t size_of() const { return sizeof(*this); }
175
170
  bool has_charset(void) const
176
 
  { return charset() == &my_charset_bin ? false : true; }
 
171
  { return charset() != &my_charset_bin; }
177
172
  uint32_t max_display_length();
178
173
};
179
174