|
Under terms of this task we'll get rid of the code testing result_type() against STRING_RESULT, REAL_RESULT, DECIMAL_RESULT and move this code into a new virtual method in Type_handler
virtual int Item_save_in_field(Item *item, Field *field,
|
bool no_conversions) const= 0;
|
The method Item::save_in_field() will turn into simple two lines:
int Item::save_in_field(Field *field, bool no_conversions)
|
{
|
int error= type_handler()->Item_save_in_field(this, field, no_conversions);
|
return error ? error : (field->table->in_use->is_error() ? 1 : 0);
|
}
|
|