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

  1. Path: sparky!uunet!gatech!emory!ifs.univie.ac.at
  2. From: hitz@ifs.univie.ac.at (Martin Hitz)
  3. Newsgroups: comp.databases.informix
  4. Subject: buggy ROWID
  5. Message-ID: <9422@emory.mathcs.emory.edu>
  6. Date: 31 Aug 92 17:18:03 GMT
  7. Sender: walt@mathcs.emory.edu
  8. Reply-To: hitz@ifs.univie.ac.at (Martin Hitz)
  9. Lines: 58
  10. X-Informix-List-ID: <list.1409>
  11.  
  12. We are running Informix SE 2.10.03K with SCO Unix.
  13.  
  14. Recently, I have been debugging an error in our application which
  15. I managed to boil down to the following SQL-script. Can anybody
  16. tell me if it's a bug or if we misunderstood the concept of ROWID?
  17. To my opinion, the two SELECTs at the end which differ only with 
  18. respect to the sequence of tables in the FROM clause
  19. should NOT generate different output. In fact, I consider the last output
  20. WRONG:
  21.  
  22. create table a (k smallint);
  23. create table b (k smallint);
  24.  
  25. insert into a values (1);
  26. insert into a values (2);
  27. insert into a values (3);
  28.  
  29. insert into b select * from a;
  30. delete from b where k = 2;
  31.  
  32. select rowid brow, k bk from b;
  33.  
  34.        brow     bk 
  35.  
  36.           1      1
  37.           3      3
  38.  
  39. select a.rowid arow,  b.rowid brow, a.k ak, b.k bk from b, a where a.k = b.k;
  40.  
  41.        arow        brow     ak     bk 
  42.  
  43.           1           1      1      1
  44.           3           3      3      3
  45.  
  46. select a.rowid arow,  b.rowid brow, a.k ak, b.k bk from a, b where a.k = b.k;
  47.  
  48.        arow        brow     ak     bk 
  49.  
  50.           1           1      1      1
  51.           3           2      3      3
  52.  
  53.                      ^^^
  54.                      !!!
  55.  
  56.  
  57. Many thanks in advance, 
  58.  
  59.  
  60. Martin Hitz
  61.                     
  62. Department of Information Systems       Internet: hitz@ifs.univie.ac.at
  63. University of Vienna                    Phone:    +43-1-40103-2795    
  64. Liebiggasse 4/3-4                                 +43-1-436712
  65. A-1010 Vienna (Austria, Europe)         Fax:      +43-1-430197
  66.  
  67. P.S.: Another inconvenience: ISQL core-dumps whenever it asks to select
  68.       a table interactively, obviously because there are more of them
  69.       than could fit on one screen. Is there a work-around?
  70.