mirror of
https://github.com/MariaDB/server.git
synced 2025-04-19 13:45:32 +02:00
Field_num::get_equal_const_item() appeared to be in a wrong file (item.cc).
Moving to field.cc.
This commit is contained in:
parent
4be6eee8f1
commit
0736cddbd4
2 changed files with 19 additions and 19 deletions
19
sql/field.cc
19
sql/field.cc
|
@ -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.
|
||||
|
||||
|
|
19
sql/item.cc
19
sql/item.cc
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue