summaryrefslogtreecommitdiff
path: root/sql/sql_time.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-08-21 10:07:26 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2018-08-21 10:07:26 +0200
commitb4210f364003fbea3ccd778b5f5f5dbfc2bfa2f8 (patch)
treedf1647a564cfe504d5ceae00e1bb09ba750bdf77 /sql/sql_time.cc
parent75dfd4acb995789ca5f86ccbd361fff9d2797e79 (diff)
parentbcc677bb7264db08b22284998706b44c377ed8ec (diff)
downloadmariadb-git-b4210f364003fbea3ccd778b5f5f5dbfc2bfa2f8.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/sql_time.cc')
-rw-r--r--sql/sql_time.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_time.cc b/sql/sql_time.cc
index 6323538f193..c4d875e4178 100644
--- a/sql/sql_time.cc
+++ b/sql/sql_time.cc
@@ -190,7 +190,7 @@ bool get_date_from_daynr(long daynr,uint *ret_year,uint *ret_month,
ulong convert_period_to_month(ulong period)
{
ulong a,b;
- if (period == 0)
+ if (period == 0 || period > 999912)
return 0L;
if ((a=period/100) < YY_PART_YEAR)
a+=2000;