diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-10-18 15:14:39 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-10-18 15:14:39 +0200 |
commit | da4503e956ee067947e504c6e73052d9d906742c (patch) | |
tree | a70bbc33f0411ef29c347a570d8253445d8013e4 /sql/item_timefunc.cc | |
parent | babbf8c6fc6da92cd1b2bb23f04e996f84b0ca1a (diff) | |
parent | b000e169562697aa072600695d4f0c0412f94f4f (diff) | |
download | mariadb-git-da4503e956ee067947e504c6e73052d9d906742c.tar.gz |
Merge branch '5.5' into 10.0
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index d9bfeed418a..c7a14049f37 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -1789,9 +1789,18 @@ overflow: ltime->hour= TIME_MAX_HOUR+1; check_time_range(ltime, decimals, &unused); - make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, - err->ptr(), err->length(), - MYSQL_TIMESTAMP_TIME, NullS); + if (!err) + { + ErrConvInteger err2(sec, unsigned_flag); + make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, + &err2, MYSQL_TIMESTAMP_TIME, NullS); + } + else + { + ErrConvString err2(err); + make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, + &err2, MYSQL_TIMESTAMP_TIME, NullS); + } return 0; } |