home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / informix / 1840 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  2.1 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!usc!elroy.jpl.nasa.gov!swrinde!emory!hector.cc.bellcore.com
  2. From: warren@hector.cc.bellcore.com (saccente,warren j)
  3. Newsgroups: comp.databases.informix
  4. Subject: RE: buggy ROWID
  5. Message-ID: <9429@emory.mathcs.emory.edu>
  6. Date: 31 Aug 92 21:53:06 GMT
  7. Sender: walt@mathcs.emory.edu
  8. Reply-To: warren@hector.cc.bellcore.com (saccente,warren j)
  9. Lines: 61
  10. X-Informix-List-ID: <list.1413>
  11.  
  12.  
  13. Martin Hitz writes: 
  14.  
  15. } We are running Informix SE 2.10.03K with SCO Unix.
  16. } Recently, I have been debugging an error in our application which
  17. } I managed to boil down to the following SQL-script. Can anybody
  18. } tell me if it's a bug or if we misunderstood the concept of ROWID?
  19. } To my opinion, the two SELECTs at the end which differ only with 
  20. } respect to the sequence of tables in the FROM clause
  21. } should NOT generate different output. In fact, I consider the last output
  22. } WRONG:
  23. } create table a (k smallint);
  24. } create table b (k smallint);
  25. } insert into a values (1);
  26. } insert into a values (2);
  27. } insert into a values (3);
  28. } insert into b select * from a;
  29. } delete from b where k = 2;
  30. } select rowid brow, k bk from b;
  31. }        brow     bk 
  32. }           1      1
  33. }           3      3
  34. } select a.rowid arow,  b.rowid brow, a.k ak, b.k bk from b, a where a.k = b.k;
  35. }        arow        brow     ak     bk 
  36. }           1           1      1      1
  37. }           3           3      3      3
  38. } select a.rowid arow,  b.rowid brow, a.k ak, b.k bk from a, b where a.k = b.k;
  39. }        arow        brow     ak     bk 
  40. }           1           1      1      1
  41. }           3           2      3      3
  42. }                      ^^^
  43. }                      !!!
  44. }
  45.  
  46. Under 4.0 Online the correct result is returned no matter which table is
  47. listed first.
  48.  
  49. } P.S.: Another inconvenience: ISQL core-dumps whenever it asks to select
  50. }       a table interactively, obviously because there are more of them
  51. }       than could fit on one screen. Is there a work-around?
  52.  
  53. I'm not sure if I understand the problem - but I use ISQL all the time
  54. without getting any core dumps.
  55.  
  56. Warren J. Saccente
  57. Bellcore
  58.