Re: Possible Feb 29, 2000 Bug?
Posted in 1998
Larry
We have. The solution in our case was to upgrade to a later version (ie
7.24.UC5 on HP-UX 10.20) from the one we were using (7.23.UC3). We haven't
upgraded yet, but its a bug.
Sujit
______________________________ Reply Separator _________________________________
Subject: Possible Feb 29, 2000 Bug?
Author: Larry Kemmerling <larryk@vigilante.airone.claircom.com> at internet
Date: 8/11/98 10:19 AM
Informix gurus,
While doing Y2K testing, our organization came across
a problem trying to subtract a 1 year interval from a
datetime column with the value "2000-02-29 00:00:00".
Here's some sample code:
CREATE TEMP TABLE tFoo
( DateVal Datetime year to second
) WITH NO LOG;
INSERT INTO tFoo
( DateVal )
VALUES
( "2000-02-29 00:00:00" );
SELECT ( DateVal - INTERVAL (365) DAY(9) TO DAY )
FROM tFoo;
SELECT ( DateVal - INTERVAL (366) DAY(9) TO DAY )
FROM tFoo;
SELECT ( DateVal - INTERVAL (1) YEAR(9) TO YEAR )
FROM tFoo;
The last select statement causes error -1267. Error -1267
says:
-1267 The result of a datetime computation is out of range.
In this statement, a DATETIME computation has produced a value that
cannot be stored. This situation can occur, for example, if a very
large interval is added to a DATETIME. Review the expressions in the
statement, and see if you can change the sequence of operations to
avoid the overflow.
I might have expected error -1206, but not the 1267 error. Is there
something I'm missing?
The value of DBCENTURY has no effect whatsoever.
I found this problem running against 7.30.UC3 on Solaris 2.6. I've
confirmed the problem exists with 7.14.UD1 on Solaris 2.5 and 5.04.UC1
on SunOs 4.1.4.
I've opened a case with tech support, but I'm wondering if anyone else
has encountered this problem.
Thanks for your time.
Larry Kemmerling
Product Systems Engineer
AT&T Wireless Services
Aviation Communications Division