home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / database / 7661 < prev    next >
Encoding:
Text File  |  1992-11-07  |  1.6 KB  |  54 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!nntp1.radiomail.net!fernwood!rossix!mickan
  3. From: mickan@rossinc.com (Michael J. Andrew)
  4. Subject: Involuntary rollbacks....does your dbms do this?
  5. Message-ID: <1992Nov4.015343.16141@rossinc.com>
  6. Organization: Ross Systems, Inc.
  7. Date: Wed, 4 Nov 1992 01:53:43 GMT
  8. Lines: 44
  9.  
  10. My "problem" relates to Ingres.  What I need to know is, does this behaviour
  11. extend to other databases in general.  Right now I know the answer is
  12. "no" for Rdb.
  13.  
  14.  
  15. Symptom:
  16.  
  17.     OPEN cursor C on table T1
  18.     FETCH from C
  19.     FETCH from C
  20.     FETCH from C
  21.     ...            (no problem so far)
  22.     FETCH from C
  23.     INSERT to table T2    ( this insert fails, due to having a duplicate
  24.                   primary key, or index values, or whatever the
  25.                   right dbms term it!)
  26.             (This is the correct behavior for the application)
  27.     FETCH from C
  28.  
  29.     The last fetch fails, with the message "Cursor not open"
  30.  
  31.  
  32. Diagnosis:
  33.  
  34.     Ingres performs a ROLLBACK whenever an attempt is made to perform
  35.     an INSERT which fails.
  36.  
  37.  
  38. Discussion:
  39.  
  40. This makes no sense to me.  This code came from a file based application
  41. which is using an algorithm to find an empty slot in a "table" by attempting
  42. to write records (which may be duplicates with existing ones) until
  43. a write finally succeeds (after changing some of the index values).
  44.  
  45. Is there something in ANSI which requires this behaviour, or is this a
  46. quirky Ingres thing?
  47.  
  48. What does your database do?
  49. -- 
  50. --------------------------------------------------------------
  51. Michael J. Andrew    Ross Systems Inc.    (415) 593 2500
  52. ..!fernwood!rossix!mick
  53. mick@rossinc.com
  54.