~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-23 10:02:30 UTC
  • mto: This revision was merged to the branch mainline in revision 2348.
  • Revision ID: olafvdspek@gmail.com-20110623100230-w8vx1so32tkxsh6f
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
787
787
 
788
788
  table::Singular* table= &session->getInstanceTable(); // This will not go into the tableshare cache, so no key is used.
789
789
 
790
 
  table->getMemRoot().multi_alloc(0,
 
790
  table->mem().multi_alloc(0,
791
791
    &default_field, sizeof(Field*) * (field_count),
792
792
    &from_field, sizeof(Field*)*field_count,
793
793
    &copy_func, sizeof(*copy_func)*(copy_func_count+1),
805
805
  memset(from_field, 0, sizeof(Field*)*field_count);
806
806
 
807
807
  memory::Root* mem_root_save= session->mem_root;
808
 
  session->mem_root= &table->getMemRoot();
 
808
  session->mem_root= &table->mem();
809
809
 
810
810
  table->getMutableShare()->setFields(field_count+1);
811
811
  table->setFields(table->getMutableShare()->getFields(true));
892
892
          }
893
893
          session->mem_root= mem_root_save;
894
894
          *argp= new Item_field(new_field);
895
 
          session->mem_root= &table->getMemRoot();
 
895
          session->mem_root= &table->mem();
896
896
          if (!(new_field->flags & NOT_NULL_FLAG))
897
897
          {
898
898
            null_count++;