diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-09-25 22:05:56 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-09-25 22:05:56 +0300 |
commit | 4a32e2395e1ff6cf7274d0567282b1747031108b (patch) | |
tree | f20565057eebcd25fda9292e66695bbf8a409f41 /sql/field_conv.cc | |
parent | b773270c397a97425abc506e7d7fbc5fedb99d9c (diff) | |
parent | 86c3ba65aa39e1e81c52f3455a1bcf187906dffc (diff) | |
download | mariadb-git-4a32e2395e1ff6cf7274d0567282b1747031108b.tar.gz |
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'sql/field_conv.cc')
-rw-r--r-- | sql/field_conv.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index d97c9f1fd04..a817db51569 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -417,6 +417,13 @@ void Field::do_field_decimal(Copy_field *copy) } +void Field::do_field_timestamp(Copy_field *copy) +{ + // XXX why couldn't we do it everywhere? + copy->from_field->save_in_field(copy->to_field); +} + + void Field::do_field_temporal(Copy_field *copy) { MYSQL_TIME ltime; @@ -706,6 +713,16 @@ void Copy_field::set(Field *to,Field *from,bool save) } +Field::Copy_func *Field_timestamp::get_copy_func(const Field *from) const +{ + Field::Copy_func *copy= Field_temporal::get_copy_func(from); + if (copy == do_field_temporal && from->type() == MYSQL_TYPE_TIMESTAMP) + return do_field_timestamp; + else + return copy; +} + + Field::Copy_func *Field_temporal::get_copy_func(const Field *from) const { /* If types are not 100 % identical then convert trough get_date() */ |