summaryrefslogtreecommitdiff
path: root/sql/sql_time.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-08-15 16:48:13 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2018-08-15 16:48:13 +0200
commitbcc677bb7264db08b22284998706b44c377ed8ec (patch)
treeedbffbf3a801c0fcc26f6bb6a0fc0b62d151fc87 /sql/sql_time.cc
parentb62ac161856570e9a0e92d17de1e3dd31d54410f (diff)
parent1b797e9e6308913c2472f3e04ad253e95a35d59f (diff)
downloadmariadb-git-bcc677bb7264db08b22284998706b44c377ed8ec.tar.gz
Merge branch '5.5' into 10.0
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 a618f751e65..2a2b8fefe74 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;