summaryrefslogtreecommitdiff
path: root/sql-common/my_time.c
diff options
context:
space:
mode:
authorunknown <tnurnberg@sin.intern.azundris.com>2007-10-12 11:46:48 +0200
committerunknown <tnurnberg@sin.intern.azundris.com>2007-10-12 11:46:48 +0200
commit773f9dcc069db9af906ecbf2ea50917cf412ba83 (patch)
tree82b0ba8c6fa3878dd5d6f9923ac6dce9e838d945 /sql-common/my_time.c
parent461e466869dea3d1da0afc1939eb2a57d3223411 (diff)
downloadmariadb-git-773f9dcc069db9af906ecbf2ea50917cf412ba83.tar.gz
Bug#30951: makedate returns different results depending on version of mysql
makedate() will fold years below 100 into the 1970-2069 range. CS removes code that also wrongly folded years between 100 and 200 into that range, which should be left unchanged. Backport from 5.1. mysql-test/r/func_sapdb.result: Show that makedate() works correctly for 100 <= year < 200. mysql-test/t/func_sapdb.test: Show that makedate() works correctly for 100 <= year < 200. sql-common/my_time.c: Remove unnecessary date magic. Syncs behaviour with 5.1+ and manual.
Diffstat (limited to 'sql-common/my_time.c')
-rw-r--r--sql-common/my_time.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index f5d5828e024..3c08db6bf97 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -769,11 +769,6 @@ long calc_daynr(uint year,uint month,uint day)
if (year == 0 && month == 0 && day == 0)
DBUG_RETURN(0); /* Skip errors */
- if (year < 200)
- {
- if ((year=year+1900) < 1900+YY_PART_YEAR)
- year+=100;
- }
delsum= (long) (365L * year+ 31*(month-1) +day);
if (month <= 2)
year--;