~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/sum.cc

  • Committer: Mark Atwood
  • Date: 2011-06-25 15:38:53 UTC
  • mfrom: (2318.6.78 refactor16)
  • Revision ID: me@mark.atwood.name-20110625153853-za5fjiwd3z0aykdd
mergeĀ lp:~olafvdspek/drizzle/refactor16

Show diffs side-by-side

added added

removed removed

Lines of Context:
411
411
  forced_const(item->forced_const)
412
412
{
413
413
  if (arg_count <= 2)
414
 
    args=tmp_args;
 
414
    args= tmp_args;
415
415
  else
416
 
    args= (Item**) session->mem.alloc(sizeof(Item*)*arg_count);
 
416
    args= new (session->mem) Item*[arg_count];
417
417
  memcpy(args, item->args, sizeof(Item*)*arg_count);
418
418
}
419
419
 
2656
2656
      {
2657
2657
        uint32_t *length;
2658
2658
        compare_key= (qsort_cmp2) composite_key_cmp;
2659
 
        cmp_arg= (void*) this;
2660
 
        field_lengths= (uint32_t*) session->mem.alloc(table->getShare()->sizeFields() * sizeof(uint32_t));
 
2659
        cmp_arg= this;
 
2660
        field_lengths= new (session->mem) uint32_t[table->getShare()->sizeFields()];
2661
2661
        for (tree_key_length= 0, length= field_lengths, field= table->getFields();
2662
2662
             field < field_end; ++field, ++length)
2663
2663
        {