diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc index 92f3d55fcf9..499d23aa0f2 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -6957,7 +6957,8 @@ Item *Item_int::clone_item(THD *thd) } -void Item_datetime::set(longlong packed, enum_mysql_timestamp_type ts_type) +void Item_datetime::set_from_packed(longlong packed, + enum_mysql_timestamp_type ts_type) { unpack_time(packed, <ime, ts_type); } @@ -6973,6 +6974,16 @@ longlong Item_datetime::val_int() return TIME_to_ulonglong(<ime); } +void Item_datetime::print(String *str, enum_query_type query_type) +{ + Datetime dt(current_thd, this); + String dt_str; + dt.to_string(&dt_str, decimals); + str->append('\''); + str->append(dt_str); + str->append('\''); +} + int Item_decimal::save_in_field(Field *field, bool no_conversions) { field->set_notnull(); |