mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 15:24:16 +01:00
Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/M50/mysql-5.0
This commit is contained in:
commit
03d1a29833
1 changed files with 4 additions and 4 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue