~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.cc

  • Committer: Mark Atwood
  • Date: 2011-06-22 20:04:22 UTC
  • mfrom: (2318.6.39 rf)
  • Revision ID: me@mark.atwood.name-20110622200422-609npl456o0e5p32
mergeĀ lp:~olafvdspek/drizzle/refactor13

Show diffs side-by-side

added added

removed removed

Lines of Context:
1037
1037
 
1038
1038
Field *Field::new_field(memory::Root *root, Table *new_table, bool)
1039
1039
{
1040
 
  Field* tmp= (Field*) root->memdup_root((char*) this,size_of());
 
1040
  Field* tmp= (Field*) root->memdup(this,size_of());
1041
1041
  if (tmp->table->maybe_null)
1042
1042
    tmp->flags&= ~NOT_NULL_FLAG;
1043
1043
  tmp->table= new_table;
1064
1064
 
1065
1065
Field *Field::clone(memory::Root *root, Table *new_table)
1066
1066
{
1067
 
  Field *tmp= (Field*) root->memdup_root((char*) this,size_of());
 
1067
  Field *tmp= (Field*) root->memdup(this,size_of());
1068
1068
  tmp->init(new_table);
1069
1069
  tmp->move_field_offset((ptrdiff_t) (new_table->getInsertRecord() - new_table->getDefaultValues()));
1070
1070
  return tmp;