summaryrefslogtreecommitdiff
path: root/sql/sql_time.cc
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2018-03-15 03:45:28 +0200
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2018-03-15 03:45:28 +0200
commit8152c52e1af608da5d288a4e6fc82e2d804e64cd (patch)
tree8ff56cdb8c9766b04b015f0c5c896a202122abb1 /sql/sql_time.cc
parent782fb1e016e0342074ca9938e412a14d20d6f793 (diff)
parent3d5dff6cae5cdefe376583f811c9af109ea08080 (diff)
downloadmariadb-git-8152c52e1af608da5d288a4e6fc82e2d804e64cd.tar.gz
Merge remote-tracking branch '10.0' into 10.1
Diffstat (limited to 'sql/sql_time.cc')
-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 2e2c5932c2a..6323538f193 100644
--- a/sql/sql_time.cc
+++ b/sql/sql_time.cc
@@ -959,6 +959,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