Re: Y2K bug in Informix
Posted in 1998
In article <362DF279.714B0DE@clientlink.com>,
Anatolii Korotkov <korotan@clientlink.com> wrote:
> Hello there,
> During our testing of Informix 7.22 with respect to the notorious
> 'millennium bug', I had the displeasure to see it firsthand. This
> particular bug manifests itself only under certain circumstances on the
> 29 of February, 2000. It appears that Informix Corp. is not aware of
> that, at least I could not find any recommendations or patches to deal
> with the problem. I wonder if anybody encountered this 'insect' and
> dealt with it without resorting to creating DBCENTURY-like-logic in the
> code.
>
> To replicate the conditions under which you may see the problem, do the
> following:
> (use dbaccess)
> 1) set the environment variable DBCENTURY to C, which corresponds to
> Closest;
> 2) create a table with a datetime field:
> CREATE TABLE Y2K_bug ( leap_year datetime year to day );> 3) to test DBCENTURY run queries:
> INSERT INTO Y2K_bug VALUES ('00-02-28');
> INSERT INTO Y2K_bug VALUES ('2000-02-29');> these steps should not cause any trouble - they confirm that DBCENTURY
> works as advertised in terms of figuring out what date it is, and
> Informix recognizes 2000 as a leap year;
> 4) now run the query that engages DBCENTURY and 2000 as a leap year:
> INSERT INTO Y2K_bug VALUES ('00-02-29');> it should generate the following error message:
> 1263: A field in a datetime or interval value is out of range or
> incorrect.> At least our copy of Informix 7.22 does this.
>
With onstat -g sql <ses_id> you can see that probably it's trying
to insert 02/29/1900.
Check Informix Techinfo Center or Tech Support cause there are some
bugs related to DBCENTURY behaviour with 02/29/00 in different
versions and platforms.
You will need to upgrade to appropriate version if it is fixed.
> --
> Have a nice day
>
> Anatolii Korotkov
> Software Engineer
> Clientlink Corp.
> (770) 663-8963 ext.185
> ======================================================
> " Many things are not clear to us.
> Though not because our perceptions are too weak,
> but because these things are not included into the
> scoup of our comprehensions."
> Koz'ma Prutkov
>
--
Vardan Aroustamian
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own