Skip to content

Commit 0736cdd

Browse files
author
Alexander Barkov
committed
Field_num::get_equal_const_item() appeared to be in a wrong file (item.cc).
Moving to field.cc.
1 parent 4be6eee commit 0736cdd

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

sql/field.cc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,25 @@ Item *Field_num::convert_zerofill_number_to_string(THD *thd, Item *item) const
14021402
}
14031403

14041404

1405+
Item *Field_num::get_equal_const_item(THD *thd, const Context &ctx,
1406+
Item_field *field_item,
1407+
Item *const_item)
1408+
{
1409+
DBUG_ASSERT(const_item->const_item());
1410+
if ((flags & ZEROFILL_FLAG) && IS_NUM(type()))
1411+
{
1412+
if (ctx.subst_constraint() == IDENTITY_SUBST)
1413+
return convert_zerofill_number_to_string(thd, const_item);
1414+
else
1415+
{
1416+
DBUG_ASSERT(ctx.compare_type() != STRING_RESULT);
1417+
return field_item;
1418+
}
1419+
}
1420+
return const_item;
1421+
}
1422+
1423+
14051424
/**
14061425
Test if given number is a int.
14071426

sql/item.cc

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5370,25 +5370,6 @@ Item *Item_field::propagate_equal_fields(THD *thd,
53705370
}
53715371

53725372

5373-
Item *Field_num::get_equal_const_item(THD *thd, const Context &ctx,
5374-
Item_field *field_item,
5375-
Item *const_item)
5376-
{
5377-
DBUG_ASSERT(const_item->const_item());
5378-
if ((flags & ZEROFILL_FLAG) && IS_NUM(type()))
5379-
{
5380-
if (ctx.subst_constraint() == IDENTITY_SUBST)
5381-
return convert_zerofill_number_to_string(thd, const_item);
5382-
else
5383-
{
5384-
DBUG_ASSERT(ctx.compare_type() != STRING_RESULT);
5385-
return field_item;
5386-
}
5387-
}
5388-
return const_item;
5389-
}
5390-
5391-
53925373
/**
53935374
Mark the item to not be part of substitution if it's not a binary item.
53945375

0 commit comments

Comments
 (0)