~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Mark Atwood
  • Date: 2011-06-24 11:45:17 UTC
  • mfrom: (2318.6.64 rf)
  • Revision ID: me@mark.atwood.name-20110624114517-1mq8no6jlp2nrg7m
mergeĀ lp:~olafvdspek/drizzle/refactor15

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++;
1032
1032
  table->setup_tmp_table_column_bitmaps();
1033
1033
 
1034
1034
  recinfo=param->start_recinfo;
1035
 
  null_flags=(unsigned char*) table->getInsertRecord();
 
1035
  null_flags= table->getInsertRecord();
1036
1036
  pos=table->getInsertRecord()+ null_pack_length;
1037
1037
  if (null_pack_length)
1038
1038
  {
1042
1042
    recinfo++;
1043
1043
    memset(null_flags, 255, null_pack_length);  // Set null fields
1044
1044
 
1045
 
    table->null_flags= (unsigned char*) table->getInsertRecord();
 
1045
    table->null_flags= table->getInsertRecord();
1046
1046
    table->getMutableShare()->null_fields= null_count+ hidden_null_count;
1047
1047
    table->getMutableShare()->null_bytes= null_pack_length;
1048
1048
  }