diff options
author | Alexander Barkov <bar@mnogosearch.org> | 2014-10-03 15:07:53 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mnogosearch.org> | 2014-10-03 15:07:53 +0400 |
commit | 68354ef272087d589f07ee8892301cd8b9ff6eba (patch) | |
tree | 8c2e4703cef47503fd44e9a847748c57050262af /sql/item.cc | |
parent | b737d902a8f4b42e8e515d112aeeb6ebe5ffa91a (diff) | |
download | mariadb-git-68354ef272087d589f07ee8892301cd8b9ff6eba.tar.gz |
MDEV-6592 Assertion `ltime->day == 0' failed with TIMESTAMP, MAKETIME
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sql/item.cc b/sql/item.cc index d58e4d285c5..b191e93808f 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -9015,17 +9015,11 @@ bool Item_cache_temporal::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate) int Item_cache_temporal::save_in_field(Field *field, bool no_conversions) { - int error; - if (!has_value()) + MYSQL_TIME ltime; + if (get_date(<ime, 0)) return set_field_to_null_with_conversions(field, no_conversions); - field->set_notnull(); - - MYSQL_TIME ltime; - unpack_time(value, <ime); - ltime.time_type= mysql_type_to_time_type(field_type()); - error= field->store_time_dec(<ime, decimals); - + int error= field->store_time_dec(<ime, decimals); return error ? error : field->table->in_use->is_error() ? 1 : 0; } |