Field_num::get_equal_const_item() appeared to be in a wrong file (item.cc).

Moving to field.cc.
This commit is contained in:
Alexander Barkov 2015-09-07 06:45:51 +04:00
parent 4be6eee8f1
commit 0736cddbd4
2 changed files with 19 additions and 19 deletions

View file

@ -1402,6 +1402,25 @@ Item *Field_num::convert_zerofill_number_to_string(THD *thd, Item *item) const
}
Item *Field_num::get_equal_const_item(THD *thd, const Context &ctx,
Item_field *field_item,
Item *const_item)
{
DBUG_ASSERT(const_item->const_item());
if ((flags & ZEROFILL_FLAG) && IS_NUM(type()))
{
if (ctx.subst_constraint() == IDENTITY_SUBST)
return convert_zerofill_number_to_string(thd, const_item);
else
{
DBUG_ASSERT(ctx.compare_type() != STRING_RESULT);
return field_item;
}
}
return const_item;
}
/**
Test if given number is a int.

View file

@ -5370,25 +5370,6 @@ Item *Item_field::propagate_equal_fields(THD *thd,
}
Item *Field_num::get_equal_const_item(THD *thd, const Context &ctx,
Item_field *field_item,
Item *const_item)
{
DBUG_ASSERT(const_item->const_item());
if ((flags & ZEROFILL_FLAG) && IS_NUM(type()))
{
if (ctx.subst_constraint() == IDENTITY_SUBST)
return convert_zerofill_number_to_string(thd, const_item);
else
{
DBUG_ASSERT(ctx.compare_type() != STRING_RESULT);
return field_item;
}
}
return const_item;
}
/**
Mark the item to not be part of substitution if it's not a binary item.