~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join.cc

  • Committer: Brian Aker
  • Date: 2010-04-20 18:23:07 UTC
  • mto: This revision was merged to the branch mainline in revision 1502.
  • Revision ID: brian@gaz-20100420182307-jwyhun4vm2dtugyb
There is room for improvement around this. We should be using rows as well
in the future as a metric for disk/memory store. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
2348
2348
  {
2349
2349
    /* Get reference pointers to sum functions in place */
2350
2350
    memcpy(ref_pointer_array, rollup.ref_pointer_arrays[i],
2351
 
     ref_pointer_array_size);
 
2351
           ref_pointer_array_size);
2352
2352
    if ((!having || having->val_int()))
2353
2353
    {
2354
2354
      int write_error;
2362
2362
      copy_sum_funcs(sum_funcs_end[i+1], sum_funcs_end[i]);
2363
2363
      if ((write_error= table_arg->cursor->ha_write_row(table_arg->record[0])))
2364
2364
      {
2365
 
  if (create_myisam_from_heap(session, table_arg,
2366
 
                                    tmp_table_param.start_recinfo,
2367
 
                                    &tmp_table_param.recinfo,
2368
 
                                    write_error, 0))
2369
 
    return 1;
 
2365
        my_error(ER_USE_SQL_BIG_RESULT, MYF(0));
 
2366
        return 1;
2370
2367
      }
2371
2368
    }
2372
2369
  }
2821
2818
      {
2822
2819
        if (!table->cursor->is_fatal_error(error, HA_CHECK_DUP))
2823
2820
          goto end;
2824
 
        if (create_myisam_from_heap(join->session, table,
2825
 
                                          join->tmp_table_param.start_recinfo,
2826
 
                                          &join->tmp_table_param.recinfo,
2827
 
                  error, 1))
2828
 
          return NESTED_LOOP_ERROR;        // Not a table_is_full error
2829
 
        table->s->uniques= 0;                   // To ensure rows are the same
 
2821
 
 
2822
        my_error(ER_USE_SQL_BIG_RESULT, MYF(0));
 
2823
        return NESTED_LOOP_ERROR;        // Table is_full error
2830
2824
      }
2831
2825
      if (++join->send_records >= join->tmp_table_param.end_write_records && join->do_send_rows)
2832
2826
      {
2901
2895
  copy_funcs(join->tmp_table_param.items_to_copy);
2902
2896
  if ((error=table->cursor->ha_write_row(table->record[0])))
2903
2897
  {
2904
 
    if (create_myisam_from_heap(join->session, table,
2905
 
                                join->tmp_table_param.start_recinfo,
2906
 
                                &join->tmp_table_param.recinfo,
2907
 
                                error, 0))
2908
 
      return NESTED_LOOP_ERROR;            // Not a table_is_full error
2909
 
    /* Change method to update rows */
2910
 
    table->cursor->ha_index_init(0, 0);
2911
 
    join->join_tab[join->tables-1].next_select= end_unique_update;
 
2898
    my_error(ER_USE_SQL_BIG_RESULT, MYF(0));
 
2899
    return NESTED_LOOP_ERROR;        // Table is_full error
2912
2900
  }
2913
2901
  join->send_records++;
2914
2902
  return NESTED_LOOP_OK;