~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.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:
187
187
  memset(quick_key_parts, 0, sizeof(unsigned int) * MAX_KEY);
188
188
  memset(quick_n_ranges, 0, sizeof(unsigned int) * MAX_KEY);
189
189
 
190
 
  memory::init_sql_alloc(&mem_root, TABLE_ALLOC_BLOCK_SIZE, 0);
 
190
  mem_root.init(TABLE_ALLOC_BLOCK_SIZE);
191
191
}
192
192
 
193
193
 
735
735
                 uint64_t select_options, ha_rows rows_limit,
736
736
                 const char *table_alias)
737
737
{
738
 
  memory::Root *mem_root_save;
739
738
  uint  i,field_count,null_count,null_pack_length;
740
739
  uint32_t  copy_func_count= param->func_count;
741
740
  uint32_t  hidden_null_count, hidden_null_pack_length, hidden_field_count;
813
812
    return NULL;
814
813
  }
815
814
  /* CopyField belongs to Tmp_Table_Param, allocate it in Session mem_root */
816
 
  if (!(param->copy_field= copy= new (session->mem_root) CopyField[field_count]))
817
 
  {
818
 
    return NULL;
819
 
  }
 
815
  param->copy_field= copy= new (session->mem_root) CopyField[field_count];
820
816
  param->items_to_copy= copy_func;
821
817
  /* make table according to fields */
822
818
 
823
819
  memset(default_field, 0, sizeof(Field*) * (field_count));
824
820
  memset(from_field, 0, sizeof(Field*)*field_count);
825
821
 
826
 
  mem_root_save= session->mem_root;
 
822
  memory::Root* mem_root_save= session->mem_root;
827
823
  session->mem_root= table->getMemRoot();
828
824
 
829
825
  table->getMutableShare()->setFields(field_count+1);
854
850
  param->using_indirect_summary_function= 0;
855
851
 
856
852
  List<Item>::iterator li(fields.begin());
857
 
  Item *item;
858
853
  Field **tmp_from_field=from_field;
859
 
  while ((item=li++))
 
854
  while (Item* item=li++)
860
855
  {
861
856
    Item::Type type=item->type();
862
857
    if (not_all_columns)