mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
MDEV-21497 Make Field_time, Field_datetime, Field_timestamp abstract
- Making classes Field_time, Field_datetime, Field_timestamp abstract - Adding instantiable Field_time0, Field_datetime0, Field_timestamp0 classes - Removing redundant cast in field_conv.cc, item_timefunc.cc, sp.cc in calls for set_time() and get_timestamp() - Replacing store_TIME() to store_timestamp() in log.cc and removing redundant cast
This commit is contained in:
parent
cc3135cf83
commit
497ee33848
6 changed files with 133 additions and 105 deletions
|
|
@ -168,7 +168,7 @@ int convert_null_to_field_value_or_error(Field *field)
|
|||
{
|
||||
if (field->type() == MYSQL_TYPE_TIMESTAMP)
|
||||
{
|
||||
((Field_timestamp*) field)->set_time();
|
||||
field->set_time();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -315,7 +315,7 @@ static void do_copy_timestamp(Copy_field *copy)
|
|||
if (*copy->from_null_ptr & copy->from_bit)
|
||||
{
|
||||
/* Same as in set_field_to_null_with_conversions() */
|
||||
((Field_timestamp*) copy->to_field)->set_time();
|
||||
copy->to_field->set_time();
|
||||
}
|
||||
else
|
||||
(copy->do_copy2)(copy);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue