home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!nntp1.radiomail.net!fernwood!rossix!mickan
- From: mickan@rossinc.com (Michael J. Andrew)
- Subject: Involuntary rollbacks....does your dbms do this?
- Message-ID: <1992Nov4.015343.16141@rossinc.com>
- Organization: Ross Systems, Inc.
- Date: Wed, 4 Nov 1992 01:53:43 GMT
- Lines: 44
-
- My "problem" relates to Ingres. What I need to know is, does this behaviour
- extend to other databases in general. Right now I know the answer is
- "no" for Rdb.
-
-
- Symptom:
-
- OPEN cursor C on table T1
- FETCH from C
- FETCH from C
- FETCH from C
- ... (no problem so far)
- FETCH from C
- INSERT to table T2 ( this insert fails, due to having a duplicate
- primary key, or index values, or whatever the
- right dbms term it!)
- (This is the correct behavior for the application)
- FETCH from C
-
- The last fetch fails, with the message "Cursor not open"
-
-
- Diagnosis:
-
- Ingres performs a ROLLBACK whenever an attempt is made to perform
- an INSERT which fails.
-
-
- Discussion:
-
- This makes no sense to me. This code came from a file based application
- which is using an algorithm to find an empty slot in a "table" by attempting
- to write records (which may be duplicates with existing ones) until
- a write finally succeeds (after changing some of the index values).
-
- Is there something in ANSI which requires this behaviour, or is this a
- quirky Ingres thing?
-
- What does your database do?
- --
- --------------------------------------------------------------
- Michael J. Andrew Ross Systems Inc. (415) 593 2500
- ..!fernwood!rossix!mick
- mick@rossinc.com
-