diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-11-07 14:42:36 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-11-07 14:42:36 +0400 |
commit | a5e2a14ef360a04242ec78864358f5d7eccdd741 (patch) | |
tree | c01bbbb14ddde5034f869584500592f6ce8f1d24 /sql/item_timefunc.cc | |
parent | 41e68e8e5b3ce89c61f19bf072b59cf13a6fdc16 (diff) | |
download | mariadb-git-a5e2a14ef360a04242ec78864358f5d7eccdd741.tar.gz |
MDEV-17634 Regression: TIME(0)=TIME('z') returns NULL vs 1
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index f12c8e12668..2da92f971d1 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2416,10 +2416,10 @@ void Item_char_typecast::fix_length_and_dec_internal(CHARSET_INFO *from_cs) } -bool Item_time_typecast::get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) +bool Item_time_typecast::get_date(THD *thd, MYSQL_TIME *to, date_mode_t mode) { - Time *tm= new(ltime) Time(thd, args[0], Time::Options_for_cast(), - MY_MIN(decimals, TIME_SECOND_PART_DIGITS)); + Time *tm= new(to) Time(thd, args[0], Time::Options_for_cast(mode), + MY_MIN(decimals, TIME_SECOND_PART_DIGITS)); return (null_value= !tm->is_valid_time()); } |