Below is the list of changes that have just been committed into a local
5.0 repository of tnurnberg. When tnurnberg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-10-12 11:46:48+02:00, tnurnberg@stripped +3 -0
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@stripped, 2007-10-12 11:46:46+02:00, tnurnberg@stripped +3 -0
Show that makedate() works correctly for 100 <= year < 200.
mysql-test/t/func_sapdb.test@stripped, 2007-10-12 11:46:46+02:00, tnurnberg@stripped +1 -0
Show that makedate() works correctly for 100 <= year < 200.
sql-common/my_time.c@stripped, 2007-10-12 11:46:46+02:00, tnurnberg@stripped +0 -5
Remove unnecessary date magic. Syncs behaviour with 5.1+
and manual.
diff -Nrup a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result
--- a/mysql-test/r/func_sapdb.result 2007-05-16 10:44:34 +02:00
+++ b/mysql-test/r/func_sapdb.result 2007-10-12 11:46:46 +02:00
@@ -93,6 +93,9 @@ makedate(9999,365)
select makedate(9999,366);
makedate(9999,366)
NULL
+select makedate(100,1);
+makedate(100,1)
+0100-01-01
select addtime("1997-12-31 23:59:59.999999", "1 1:1:1.000002");
addtime("1997-12-31 23:59:59.999999", "1 1:1:1.000002")
1998-01-02 01:01:01.000001
diff -Nrup a/mysql-test/t/func_sapdb.test b/mysql-test/t/func_sapdb.test
--- a/mysql-test/t/func_sapdb.test 2007-05-16 10:44:37 +02:00
+++ b/mysql-test/t/func_sapdb.test 2007-10-12 11:46:46 +02:00
@@ -47,6 +47,7 @@ select makedate(1997,1);
select makedate(1997,0);
select makedate(9999,365);
select makedate(9999,366);
+select makedate(100,1);
#Time functions
diff -Nrup a/sql-common/my_time.c b/sql-common/my_time.c
--- a/sql-common/my_time.c 2007-05-18 06:13:24 +02:00
+++ b/sql-common/my_time.c 2007-10-12 11:46:46 +02:00
@@ -769,11 +769,6 @@ long calc_daynr(uint year,uint month,uin
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--;
| Thread |
|---|
| • bk commit into 5.0 tree (tnurnberg:1.2531) BUG#30951 | Tatjana A Nuernberg | 12 Oct |