diff options
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(); }; |