diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-10-22 13:03:41 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-10-22 13:03:41 +0200 |
commit | 9d2e2d753323a934604d25144b9d1ecaf34b47d8 (patch) | |
tree | 051a721f7ea77c2278d09323e36088abe22aa66a /sql/item_timefunc.h | |
parent | d11af09865299033d5eef64531704f6ab8af5304 (diff) | |
parent | 2eb3c5e5420a724945a4cba914df25aa1e3744ce (diff) | |
download | mariadb-git-9d2e2d753323a934604d25144b9d1ecaf34b47d8.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/item_timefunc.h')
-rw-r--r-- | sql/item_timefunc.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 0e9329d501c..927ce12f079 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -502,8 +502,16 @@ public: { return val_decimal_from_date(decimal_value); } Field *create_field_for_create_select(TABLE *table) { return tmp_table_field_from_field_type(table, false, false); } +#if MARIADB_VERSION_ID > 100300 +#error This code should be removed in 10.3, to use the derived save_in_field() +#else int save_in_field(Field *field, bool no_conversions) - { return save_date_in_field(field); } + { + return field_type() == MYSQL_TYPE_TIME ? + save_time_in_field(field) : + save_date_in_field(field); + } +#endif void fix_length_and_dec(); }; |