~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/sum.cc

  • Committer: Mark Atwood
  • Date: 2011-08-12 04:08:33 UTC
  • mfrom: (2385.2.17 refactor5)
  • Revision ID: me@mark.atwood.name-20110812040833-u6j85nc6ahuc0dtz
mergeĀ lp:~olafvdspek/drizzle/refactor5

Show diffs side-by-side

added added

removed removed

Lines of Context:
434
434
  {
435
435
    ((Item_field*) args[0])->field->make_field(tmp_field);
436
436
    /* For expressions only col_name should be non-empty string. */
437
 
    char *empty_string= (char*)"";
438
 
    tmp_field->db_name= empty_string;
439
 
    tmp_field->org_table_name= empty_string;
440
 
    tmp_field->table_name= empty_string;
441
 
    tmp_field->org_col_name= empty_string;
 
437
    tmp_field->db_name= "";
 
438
    tmp_field->org_table_name= "";
 
439
    tmp_field->table_name= "";
 
440
    tmp_field->org_col_name= "";
442
441
    tmp_field->col_name= name;
443
442
    if (maybe_null)
444
443
      tmp_field->flags&= ~NOT_NULL_FLAG;
2587
2586
  tmp_table_param= new Tmp_Table_Param;
2588
2587
 
2589
2588
  /* Create a table with an unique key over all parameters */
2590
 
  for (uint32_t i=0; i < arg_count ; i++)
 
2589
  for (uint32_t i= 0; i < arg_count; i++)
2591
2590
  {
2592
2591
    Item *item=args[i];
2593
2592
    list.push_back(item);
2600
2599
  tmp_table_param->force_copy_fields= force_copy_fields;
2601
2600
  assert(table == 0);
2602
2601
 
2603
 
  if (!(table= create_tmp_table(session, tmp_table_param, list, (Order*) 0, 1,
2604
 
                                0,
2605
 
                                (select_lex->options | session->options),
2606
 
                                HA_POS_ERROR, (char*)"")))
 
2602
  if (!(table= create_tmp_table(session, tmp_table_param, list, NULL, 1, 0, (select_lex->options | session->options), HA_POS_ERROR, "")))
2607
2603
  {
2608
2604
    return true;
2609
2605
  }