~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/sum.cc

  • Committer: Monty Taylor
  • Date: 2009-12-22 09:42:05 UTC
  • mto: This revision was merged to the branch mainline in revision 1253.
  • Revision ID: mordred@inaugust.com-20091222094205-0tgdtn3zxn2t5xz5
Removed some more evil.

Show diffs side-by-side

added added

removed removed

Lines of Context:
884
884
 
885
885
 
886
886
static int item_sum_distinct_walk(void *element,
887
 
                                  element_count ,
 
887
                                  uint32_t ,
888
888
                                  void *item)
889
889
{
890
890
  return ((Item_sum_distinct*) (item))->unique_walk_function(element);
2516
2516
#endif
2517
2517
 
2518
2518
static int count_distinct_walk(void *,
2519
 
                               element_count ,
 
2519
                               uint32_t ,
2520
2520
                               void *arg)
2521
2521
{
2522
2522
  (*((uint64_t*)arg))++;
2880
2880
  Append data from current leaf to item->result.
2881
2881
*/
2882
2882
 
2883
 
int dump_leaf_key(unsigned char* key, element_count ,
 
2883
int dump_leaf_key(unsigned char* key, uint32_t ,
2884
2884
                  Item_func_group_concat *item)
2885
2885
{
2886
2886
  Table *table= item->table;
2962
2962
                       bool distinct_arg, List<Item> *select_list,
2963
2963
                       SQL_LIST *order_list, String *separator_arg)
2964
2964
  :tmp_table_param(0), warning(0),
2965
 
   separator(separator_arg), tree(0), unique_filter(NULL), table(0),
 
2965
   separator(separator_arg), tree(NULL), unique_filter(NULL), table(0),
2966
2966
   order(0), context(context_arg),
2967
2967
   arg_count_order(order_list ? order_list->elements : 0),
2968
2968
   arg_count_field(select_list->elements),
3282
3282
 
3283
3283
  if (arg_count_order)
3284
3284
  {
3285
 
    tree= &tree_base;
 
3285
    tree= new TREE;
3286
3286
    /*
3287
3287
      Create a tree for sorting. The tree is used to sort (according to the
3288
3288
      syntax of this function). If there is no order_st BY clause, we don't
3376
3376
{
3377
3377
  if (!original && unique_filter)
3378
3378
    delete unique_filter;
 
3379
  if (tree)
 
3380
    delete tree;
3379
3381
}