Commit 7379ce22 authored by unknown's avatar unknown

Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0

into mysql.com:/M50/mysql-5.0

parents 34f313ee f61ecc43
...@@ -910,14 +910,14 @@ longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res, ...@@ -910,14 +910,14 @@ longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
goto err; goto err;
if (nr <= (YY_PART_YEAR-1)*10000L+1231L) if (nr <= (YY_PART_YEAR-1)*10000L+1231L)
{ {
nr= (nr+20000000L)*1000000L; // YYMMDD, year: 2000-2069 nr= (nr+20000000L)*1000000L; /* YYMMDD, year: 2000-2069 */
goto ok; goto ok;
} }
if (nr < (YY_PART_YEAR)*10000L+101L) if (nr < (YY_PART_YEAR)*10000L+101L)
goto err; goto err;
if (nr <= 991231L) if (nr <= 991231L)
{ {
nr= (nr+19000000L)*1000000L; // YYMMDD, year: 1970-1999 nr= (nr+19000000L)*1000000L; /* YYMMDD, year: 1970-1999 */
goto ok; goto ok;
} }
if (nr < 10000101L) if (nr < 10000101L)
...@@ -931,13 +931,13 @@ longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res, ...@@ -931,13 +931,13 @@ longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
goto err; goto err;
if (nr <= (YY_PART_YEAR-1)*LL(10000000000)+LL(1231235959)) if (nr <= (YY_PART_YEAR-1)*LL(10000000000)+LL(1231235959))
{ {
nr= nr+LL(20000000000000); // YYMMDDHHMMSS, 2000-2069 nr= nr+LL(20000000000000); /* YYMMDDHHMMSS, 2000-2069 */
goto ok; goto ok;
} }
if (nr < YY_PART_YEAR*LL(10000000000)+ LL(101000000)) if (nr < YY_PART_YEAR*LL(10000000000)+ LL(101000000))
goto err; goto err;
if (nr <= LL(991231235959)) if (nr <= LL(991231235959))
nr= nr+LL(19000000000000); // YYMMDDHHMMSS, 1970-1999 nr= nr+LL(19000000000000); /* YYMMDDHHMMSS, 1970-1999 */
ok: ok:
part1=(long) (nr/LL(1000000)); part1=(long) (nr/LL(1000000));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment