summaryrefslogtreecommitdiff
path: root/sql/sql_time.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2018-03-13 12:42:41 +0400
committerAlexander Barkov <bar@mariadb.org>2018-03-13 12:42:41 +0400
commit48c11d407b409a1291c84782518c69ee9138ce72 (patch)
tree75e9f936bbce4e510776369ef0b116aae099006f /sql/sql_time.cc
parent4a35e76f645d0e5e8554f810e16aafa734584ed7 (diff)
downloadmariadb-git-48c11d407b409a1291c84782518c69ee9138ce72.tar.gz
MDEV-13202 Assertion `ltime->neg == 0' failed in date_to_datetime
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 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