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
commit91f6d169a667721dabb398cefb56d687fb0e57e2 (patch)
tree82b0ba8c6fa3878dd5d6f9923ac6dce9e838d945 /sql-common/my_time.c
parent5a6b519a2f3b6a2ac3e6375b2111cdfe43a5aff3 (diff)
downloadmariadb-git-91f6d169a667721dabb398cefb56d687fb0e57e2.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--;