~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/sum.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-21 18:18:14 UTC
  • mto: This revision was merged to the branch mainline in revision 2346.
  • Revision ID: olafvdspek@gmail.com-20110621181814-4wsfwjgbw49tzq1e
Refactor

Show diffs side-by-side

added added

removed removed

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