~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/field.cc

  • Committer: Brian Aker
  • Date: 2009-01-28 19:37:25 UTC
  • mfrom: (779.3.11 devel)
  • Revision ID: brian@tangent.org-20090128193725-pz7g7dnp2dx0863e
Merge from Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
349
349
 
350
350
bool Item_field::eq(const Item *item, bool) const
351
351
{
352
 
  Item *real_item= ((Item *) item)->real_item();
353
 
  if (real_item->type() != FIELD_ITEM)
 
352
  const Item *item_ptr= item->real_item();
 
353
  if (item_ptr->type() != FIELD_ITEM)
354
354
    return 0;
355
355
 
356
 
  Item_field *item_field= (Item_field*) real_item;
 
356
  const Item_field *item_field= static_cast<const Item_field *>(item_ptr);
357
357
  if (item_field->field && field)
358
358
    return item_field->field == field;
359
359
  /*
1125
1125
{
1126
1126
  if (item_equal)
1127
1127
  {
1128
 
    Item *const_item= item_equal->get_const();
1129
 
    if (const_item)
 
1128
    Item *const_item_ptr= item_equal->get_const();
 
1129
    if (const_item_ptr)
1130
1130
    {
1131
1131
      if (cmp_context != (Item_result)-1 &&
1132
 
          const_item->cmp_context != cmp_context)
 
1132
          const_item_ptr->cmp_context != cmp_context)
1133
1133
        return this;
1134
 
      return const_item;
 
1134
      return const_item_ptr;
1135
1135
    }
1136
1136
    Item_field *subst= item_equal->get_first();
1137
1137
    if (subst && !field->eq(subst->field))