summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_time.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_time.cc b/sql/sql_time.cc
index 1bd68e89ecb..a618f751e65 100644
--- a/sql/sql_time.cc
+++ b/sql/sql_time.cc
@@ -960,6 +960,8 @@ bool date_add_interval(MYSQL_TIME *ltime, interval_type int_type,
ltime->day= 0;
return 0;
}
+ else if (ltime->neg)
+ goto invalid_date;
if (int_type != INTERVAL_DAY)
ltime->time_type= MYSQL_TIMESTAMP_DATETIME; // Return full date