summaryrefslogtreecommitdiff
path: root/sql/sql_time.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_time.cc')
-rw-r--r--sql/sql_time.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_time.cc b/sql/sql_time.cc
index c64995fa3d6..b128a7f7291 100644
--- a/sql/sql_time.cc
+++ b/sql/sql_time.cc
@@ -914,7 +914,7 @@ void make_truncated_value_warning(THD *thd,
#define GET_PART(X, N) X % N ## LL; X/= N ## LL
bool date_add_interval(THD *thd, MYSQL_TIME *ltime, interval_type int_type,
- const INTERVAL &interval)
+ const INTERVAL &interval, bool push_warn)
{
long period, sign;
@@ -1027,6 +1027,7 @@ bool date_add_interval(THD *thd, MYSQL_TIME *ltime, interval_type int_type,
return 0; // Ok
invalid_date:
+ if (push_warn)
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_DATETIME_FUNCTION_OVERFLOW,