~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/sum.cc

  • Committer: Mark Atwood
  • Date: 2011-12-27 16:09:18 UTC
  • mfrom: (2461.2.1 trunk)
  • Revision ID: me@mark.atwood.name-20111227160918-ai7t6ka9s9xlmlbv
resolve and merge lp:~ivolucien/drizzle/trunk-bug-621861

Show diffs side-by-side

added added

removed removed

Lines of Context:
3048
3048
      table= 0;
3049
3049
      if (tree)
3050
3050
      {
3051
 
        delete_tree(tree);
 
3051
        tree->delete_tree();
3052
3052
        tree= 0;
3053
3053
      }
3054
3054
 
3083
3083
  warning_for_row= false;
3084
3084
  no_appended= true;
3085
3085
  if (tree)
3086
 
    reset_tree(tree);
 
3086
    tree->reset_tree();
3087
3087
  if (distinct)
3088
3088
    unique_filter->reset();
3089
3089
  /* No need to reset the table as we never call write_row */
3121
3121
      row_eligible= false;
3122
3122
  }
3123
3123
 
3124
 
  TREE_ELEMENT *el= 0;                          // Only for safety
 
3124
  Tree_Element *el= 0;                          // Only for safety
3125
3125
  if (row_eligible && tree)
3126
 
    el= tree_insert(tree, table->record[0] + table->getShare()->null_bytes, 0,
3127
 
                    tree->custom_arg);
 
3126
    el= tree->tree_insert(table->record[0] + table->getShare()->null_bytes, 0,
 
3127
                    tree->getCustomArg());
3128
3128
  /*
3129
3129
    If the row is not a duplicate (el->count == 1)
3130
3130
    we can dump the row here in case of GROUP_CONCAT(DISTINCT...)
3273
3273
      syntax of this function). If there is no ORDER BY clause, we don't
3274
3274
      create this tree.
3275
3275
    */
3276
 
    init_tree(tree, (uint32_t) min(session->variables.max_heap_table_size,
 
3276
     tree->init_tree((uint32_t) min(session->variables.max_heap_table_size,
3277
3277
                                   (uint64_t)(session->variables.sortbuff_size/16)), 
3278
3278
              0,
3279
3279
              tree_key_length,
3325
3325
    return 0;
3326
3326
  if (no_appended && tree)
3327
3327
    /* Tree is used for sorting as in ORDER BY */
3328
 
    tree_walk(tree, (tree_walk_action)&dump_leaf_key, (void*)this,
3329
 
              left_root_right);
 
3328
    tree->tree_walk((tree_walk_action)&dump_leaf_key, (void*)this, left_root_right);
3330
3329
  if (count_cut_values && !warning)
3331
3330
  {
3332
3331
    /*