~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/subselect.cc

  • Committer: Olaf van der Spek
  • Date: 2011-02-23 15:52:28 UTC
  • mto: (2198.2.3 drizzle-staging)
  • mto: This revision was merged to the branch mainline in revision 2199.
  • Revision ID: olafvdspek@gmail.com-20110223155228-9d8k16dqdnxmc1sl
Use List::front()

Show diffs side-by-side

added added

removed removed

Lines of Context:
523
523
  if (!select_lex->master_unit()->is_union() &&
524
524
      !select_lex->table_list.elements &&
525
525
      select_lex->item_list.size() == 1 &&
526
 
      !select_lex->item_list.head()->with_sum_func &&
 
526
      !select_lex->item_list.front().with_sum_func &&
527
527
      /*
528
528
        We cant change name of Item_field or Item_ref, because it will
529
529
        prevent it's correct resolving, but we should save name of
531
531
        list is field or reference.
532
532
        TODO: solve above problem
533
533
      */
534
 
      !(select_lex->item_list.head()->type() == FIELD_ITEM ||
535
 
        select_lex->item_list.head()->type() == REF_ITEM) &&
 
534
      !(select_lex->item_list.front().type() == FIELD_ITEM ||
 
535
        select_lex->item_list.front().type() == REF_ITEM) &&
536
536
      !join->conds && !join->having
537
537
      )
538
538
  {
545
545
      push_warning(session, DRIZZLE_ERROR::WARN_LEVEL_NOTE,
546
546
                   ER_SELECT_REDUCED, warn_buff);
547
547
    }
548
 
    substitution= select_lex->item_list.head();
 
548
    substitution= &select_lex->item_list.front();
549
549
    /*
550
550
      as far as we moved content to upper level, field which depend of
551
551
      'upper' select is not really dependent => we remove this dependence
1220
1220
  }
1221
1221
  else
1222
1222
  {
1223
 
    Item *item= (Item*) select_lex->item_list.head();
 
1223
    Item *item= &select_lex->item_list.front();
1224
1224
 
1225
1225
    if (select_lex->table_list.elements)
1226
1226
    {
1230
1230
      select_lex->item_list.push_back(new Item_int("Not_used",
1231
1231
                                                   (int64_t) 1,
1232
1232
                                                   MY_INT64_NUM_DECIMAL_DIGITS));
1233
 
      select_lex->ref_pointer_array[0]= select_lex->item_list.head();
 
1233
      select_lex->ref_pointer_array[0]= &select_lex->item_list.front();
1234
1234
 
1235
1235
      item= func->create(expr, item);
1236
1236
      if (!abort_on_null && orig_item->maybe_null)