~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/varstring.h

Giant merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLE_SERVER_FIELD_VARSTRING
22
22
#define DRIZZLE_SERVER_FIELD_VARSTRING
23
23
 
24
 
#include "mysql_priv.h"
 
24
#include <drizzled/mysql_priv.h>
25
25
 
26
26
class Field_varstring :public Field_longstr {
27
27
public:
53
53
    share->varchar_fields++;
54
54
  }
55
55
 
56
 
  enum_field_types type() const { return MYSQL_TYPE_VARCHAR; }
 
56
  enum_field_types type() const { return DRIZZLE_TYPE_VARCHAR; }
57
57
  enum ha_base_keytype key_type() const;
58
58
  uint row_pack_length() { return field_length; }
59
59
  bool zero_pack() const { return 0; }
60
 
  int  reset(void) { bzero(ptr,field_length+length_bytes); return 0; }
 
60
  int  reset(void) { memset(ptr, 0, field_length+length_bytes); return 0; }
61
61
  uint32_t pack_length() const { return (uint32_t) field_length+length_bytes; }
62
62
  uint32_t key_length() const { return (uint32_t) field_length; }
63
63
  uint32_t sort_length() const
101
101
  uint32_t data_length();
102
102
  uint32_t used_length();
103
103
  uint size_of() const { return sizeof(*this); }
104
 
  enum_field_types real_type() const { return MYSQL_TYPE_VARCHAR; }
 
104
  enum_field_types real_type() const { return DRIZZLE_TYPE_VARCHAR; }
105
105
  bool has_charset(void) const
106
106
  { return charset() == &my_charset_bin ? false : true; }
107
107
  Field *new_field(MEM_ROOT *root, struct st_table *new_table, bool keep_type);