~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/subselect.cc

  • Committer: Lee Bieber
  • Date: 2011-02-23 17:17:54 UTC
  • mfrom: (2194.1.3 build)
  • Revision ID: kalebral@gmail.com-20110223171754-5g62btbvgtzsev3n
Merge Stewart - 676770: Error log logging 'Sort aborted' messages when DML fails with ER_INVALID_ENUM_VALUE     
Merge Olaf - Use Item_equal::begin() and Use List::size()
Merge Olaf - Delete drizzled/strfunc.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
522
522
 
523
523
  if (!select_lex->master_unit()->is_union() &&
524
524
      !select_lex->table_list.elements &&
525
 
      select_lex->item_list.elements == 1 &&
 
525
      select_lex->item_list.size() == 1 &&
526
526
      !select_lex->item_list.head()->with_sum_func &&
527
527
      /*
528
528
        We cant change name of Item_field or Item_ref, because it will
1002
1002
    Check that the right part of the subselect contains no more than one
1003
1003
    column. E.g. in SELECT 1 IN (SELECT * ..) the right part is (SELECT * ...)
1004
1004
  */
1005
 
  if (select_lex->item_list.elements > 1)
 
1005
  if (select_lex->item_list.size() > 1)
1006
1006
  {
1007
1007
    my_error(ER_OPERAND_COLUMNS, MYF(0), 1);
1008
1008
    return(RES_ERROR);
1356
1356
  Select_Lex *select_lex= join->select_lex;
1357
1357
  uint32_t cols_num= left_expr->cols();
1358
1358
 
1359
 
  if (select_lex->item_list.elements != left_expr->cols())
 
1359
  if (select_lex->item_list.size() != left_expr->cols())
1360
1360
  {
1361
1361
    my_error(ER_OPERAND_COLUMNS, MYF(0), left_expr->cols());
1362
1362
    return(RES_ERROR);
2111
2111
      return;
2112
2112
    row[i]->setup(sel_item);
2113
2113
  }
2114
 
  if (item_list.elements > 1)
 
2114
  if (item_list.size() > 1)
2115
2115
    res_type= ROW_RESULT;
2116
2116
}
2117
2117
 
2118
2118
void subselect_single_select_engine::fix_length_and_dec(Item_cache **row)
2119
2119
{
2120
 
  assert(row || select_lex->item_list.elements==1);
 
2120
  assert(row || select_lex->item_list.size() == 1);
2121
2121
  set_row(select_lex->item_list, row);
2122
2122
  item->collation.set(row[0]->collation);
2123
2123
  if (cols() != 1)
2126
2126
 
2127
2127
void subselect_union_engine::fix_length_and_dec(Item_cache **row)
2128
2128
{
2129
 
  assert(row || unit->first_select()->item_list.elements==1);
 
2129
  assert(row || unit->first_select()->item_list.size() == 1);
2130
2130
 
2131
 
  if (unit->first_select()->item_list.elements == 1)
 
2131
  if (unit->first_select()->item_list.size() == 1)
2132
2132
  {
2133
2133
    set_row(unit->types, row);
2134
2134
    item->collation.set(row[0]->collation);
2685
2685
 
2686
2686
uint32_t subselect_single_select_engine::cols()
2687
2687
{
2688
 
  return select_lex->item_list.elements;
 
2688
  return select_lex->item_list.size();
2689
2689
}
2690
2690
 
2691
2691
 
2692
2692
uint32_t subselect_union_engine::cols()
2693
2693
{
2694
 
  return unit->types.elements;
 
2694
  return unit->types.size();
2695
2695
}
2696
2696
 
2697
2697
 
3061
3061
    Make sure there is only one index on the temp table, and it doesn't have
3062
3062
    the extra key part created when s->uniques > 0.
3063
3063
  */
3064
 
  assert(tmp_table->getShare()->sizeKeys() == 1 && tmp_columns->elements == tmp_key_parts);
 
3064
  assert(tmp_table->getShare()->sizeKeys() == 1 && tmp_columns->size() == tmp_key_parts);
3065
3065
 
3066
3066
 
3067
3067
  /* 2. Create/initialize execution related objects. */