~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cmpfunc.h

  • Committer: David Shrewsbury
  • Date: 2011-02-24 16:51:37 UTC
  • mfrom: (2198 drizzle-build)
  • mto: (2207.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2202.
  • Revision ID: shrewsbury.dave@gmail.com-20110224165137-wzmunxfg4855xe8j
Merge trunk and resolve conflict

Show diffs side-by-side

added added

removed removed

Lines of Context:
1152
1152
    :Item_func(), first_expr_num(-1), else_expr_num(-1),
1153
1153
    cached_result_type(INT_RESULT), left_result_type(INT_RESULT), case_item(0)
1154
1154
  {
1155
 
    ncases= list.elements;
 
1155
    ncases= list.size();
1156
1156
    if (first_expr_arg)
1157
1157
    {
1158
 
      first_expr_num= list.elements;
 
1158
      first_expr_num= list.size();
1159
1159
      list.push_back(first_expr_arg);
1160
1160
    }
1161
1161
    if (else_expr_arg)
1162
1162
    {
1163
 
      else_expr_num= list.elements;
 
1163
      else_expr_num= list.size();
1164
1164
      list.push_back(else_expr_arg);
1165
1165
    }
1166
1166
    set_arguments(list);
1572
1572
  const char *func_name() const { return "multiple equal"; }
1573
1573
  optimize_type select_optimize() const { return OPTIMIZE_EQUAL; }
1574
1574
  void sort(Item_field_cmpfunc cmp, void *arg);
1575
 
  friend class Item_equal_iterator;
1576
1575
  void fix_length_and_dec();
1577
1576
  bool fix_fields(Session *session, Item **ref);
1578
1577
  void update_used_tables();
1603
1602
  }
1604
1603
};
1605
1604
 
1606
 
 
1607
 
class Item_equal_iterator : public List<Item_field>::iterator
1608
 
{
1609
 
public:
1610
 
  inline Item_equal_iterator(Item_equal &item_equal)
1611
 
    :List<Item_field>::iterator (item_equal.fields.begin() )
1612
 
  {}
1613
 
  inline Item_field* operator++(int)
1614
 
  {
1615
 
    Item_field *item= (*(List<Item_field>::iterator *) this)++;
1616
 
    return  item;
1617
 
  }
1618
 
};
 
1605
typedef List<Item_field>::iterator Item_equal_iterator;
1619
1606
 
1620
1607
class Item_cond_and :public Item_cond
1621
1608
{