RE: buggy ROWID
Posted in 1992
Martin Hitz writes: } We are running Informix SE 2.10.03K with SCO Unix. } } Recently, I have been debugging an error in our application which } I managed to boil down to the following SQL-script. Can anybody } tell me if it's a bug or if we misunderstood the concept of ROWID? } To my opinion, the two SELECTs at the end which differ only with } respect to the sequence of tables in the FROM clause } should NOT generate different output. In fact, I consider the last output } WRONG: } } create table a (k smallint); } create table b (k smallint); } } insert into a values (1); } insert into a values (2); } insert into a values (3); } } insert into b select * from a; } delete from b where k = 2; } } select rowid brow, k bk from b; } } brow bk } } 1 1 } 3 3 } } select a.rowid arow, b.rowid brow, a.k ak, b.k bk from b, a where a.k = b.k; } } arow brow ak bk } } 1 1 1 1 } 3 3 3 3 } } select a.rowid arow, b.rowid brow, a.k ak, b.k bk from a, b where a.k = b.k; } } arow brow ak bk } } 1 1 1 1 } 3 2 3 3 } } ^^^ } !!! } Under 4.0 Online the correct result is returned no matter which table is listed first. } } P.S.: Another inconvenience: ISQL core-dumps whenever it asks to select } a table interactively, obviously because there are more of them } than could fit on one screen. Is there a work-around? I'm not sure if I understand the problem - but I use ISQL all the time without getting any core dumps. Warren J. Saccente Bellcore