~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/join.cc

Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
3278
3278
    for (; group ; group=group->next)
3279
3279
    {
3280
3280
      Cached_item *tmp= new_Cached_item(join->session, *group->item);
3281
 
      if (!tmp || join->group_fields.push_front(tmp))
 
3281
      if (!tmp)
3282
3282
        return true;
 
3283
                        join->group_fields.push_front(tmp);
3283
3284
    }
3284
3285
  }
3285
3286
  join->sort_and_group=1;     /* Mark for do_select */
6324
6325
 
6325
6326
  Item_cond_and *cond=new Item_cond_and();
6326
6327
  Table *table=join_tab->table;
6327
 
  int error;
6328
6328
  if (!cond)
6329
6329
    return(true);
6330
6330
 
6339
6339
 
6340
6340
  if (!cond->fixed)
6341
6341
    cond->fix_fields(session, (Item**)&cond);
 
6342
  int error = 0;
6342
6343
  if (join_tab->select)
6343
6344
  {
6344
 
    error=(int) cond->add(join_tab->select->cond);
 
6345
    cond->add(join_tab->select->cond);
6345
6346
    join_tab->select_cond=join_tab->select->cond=cond;
6346
6347
  }
6347
 
  else if ((join_tab->select= optimizer::make_select(join_tab->table, 0, 0, cond, 0,
6348
 
                                                     &error)))
 
6348
  else if ((join_tab->select= optimizer::make_select(join_tab->table, 0, 0, cond, 0, &error)))
6349
6349
    join_tab->select_cond=cond;
6350
6350
 
6351
 
  return(error ? true : false);
 
6351
  return error;
6352
6352
}
6353
6353
 
6354
6354
static void free_blobs(Field **ptr)