~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.h

Read Fields out of proto instead of FRM.

As non-radioactive fallout:
- no implicit defaults (see http://bugs.mysql.com/bug.php?id=43151)
- no real defaults for BLOB yet... but this paves the way (and it shouldn't be too hard now)

As radioactive fallout:
- parse_table_proto is approaching the length of War and Peace
- handling of corrupted proto is about non-existant. abort() is not ideal

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
  void operator=(Field &);
63
63
public:
64
64
  static void *operator new(size_t size) {return sql_alloc(size); }
 
65
  static void *operator new(size_t size, MEM_ROOT *mem_root)
 
66
  { return (void*) alloc_root(mem_root, (uint32_t) size); }
 
67
 
65
68
  static void operator delete(void *, size_t)
66
69
  { TRASH(ptr_arg, size); }
67
70
 
669
672
};
670
673
 
671
674
 
672
 
Field *make_field(TABLE_SHARE *share, unsigned char *ptr, uint32_t field_length,
 
675
Field *make_field(TABLE_SHARE *share, MEM_ROOT *root, unsigned char *ptr, uint32_t field_length,
673
676
                  unsigned char *null_pos, unsigned char null_bit,
674
677
                  uint32_t pack_flag, enum_field_types field_type,
675
678
                  const CHARSET_INFO * cs,