Commit 03d1a298 authored by joerg@mysql.com's avatar joerg@mysql.com

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

into mysql.com:/M50/mysql-5.0
parents a8a5f359 f5e0cf8e
......@@ -910,14 +910,14 @@ longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
goto err;
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;
}
if (nr < (YY_PART_YEAR)*10000L+101L)
goto err;
if (nr <= 991231L)
{
nr= (nr+19000000L)*1000000L; // YYMMDD, year: 1970-1999
nr= (nr+19000000L)*1000000L; /* YYMMDD, year: 1970-1999 */
goto ok;
}
if (nr < 10000101L)
......@@ -931,13 +931,13 @@ longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
goto err;
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;
}
if (nr < YY_PART_YEAR*LL(10000000000)+ LL(101000000))
goto err;
if (nr <= LL(991231235959))
nr= nr+LL(19000000000000); // YYMMDDHHMMSS, 1970-1999
nr= nr+LL(19000000000000); /* YYMMDDHHMMSS, 1970-1999 */
ok:
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