summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-10-18 15:14:39 +0200
committerSergei Golubchik <serg@mariadb.org>2017-10-18 15:14:39 +0200
commitda4503e956ee067947e504c6e73052d9d906742c (patch)
treea70bbc33f0411ef29c347a570d8253445d8013e4 /sql/item_timefunc.cc
parentbabbf8c6fc6da92cd1b2bb23f04e996f84b0ca1a (diff)
parentb000e169562697aa072600695d4f0c0412f94f4f (diff)
downloadmariadb-git-da4503e956ee067947e504c6e73052d9d906742c.tar.gz
Merge branch '5.5' into 10.0
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc15
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;
}