diff options
author | vicentiu <vicentiu@mariadb.org> | 2017-01-06 17:09:59 +0200 |
---|---|---|
committer | vicentiu <vicentiu@mariadb.org> | 2017-01-06 17:09:59 +0200 |
commit | e9aed131ead9e102c8948ebadc421960399722d4 (patch) | |
tree | ae8f4ee4ee7f7e915121ff2c73c88c20781c45ed /sql/item_timefunc.cc | |
parent | e4978d26b79120c58706e57fc66e4de1ec4b230c (diff) | |
parent | ae1b3d1991b679bb38095711de27934d7683deda (diff) | |
download | mariadb-git-e9aed131ead9e102c8948ebadc421960399722d4.tar.gz |
Merge remote-tracking branch 'origin/5.5' into 10.0
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 866dbe65ecc..fa1c3d0da90 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -426,7 +426,7 @@ static bool extract_date_time(DATE_TIME_FORMAT *format, { if (!my_isspace(&my_charset_latin1,*val)) { - make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, + make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, val_begin, length, cached_timestamp_type, NullS); break; @@ -708,7 +708,7 @@ static bool get_interval_info(const char *str,uint length,CHARSET_INFO *cs, { longlong value; const char *start= str; - for (value=0; str != end && my_isdigit(cs, *str) ; str++) + for (value= 0; str != end && my_isdigit(cs, *str); str++) value= value*10 + *str - '0'; msec_length= 6 - (str - start); values[i]= value; @@ -1460,6 +1460,7 @@ void Item_temporal_func::fix_length_and_dec() time can get us to return NULL. */ maybe_null= 1; + if (decimals) { if (decimals == NOT_FIXED_DEC) |