Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Releasing row locks with rollback to savepoint

Releasing row locks with rollback to savepoint

From: <tld_at_accessig.com>
Date: 1997/07/11
Message-ID: <868636514.28035@dejanews.com>#1/1

I have encountered an unusual problem with the row lock release that is supposed to take place when a ROLLBACK TO SAVEPOINT is issued. I have been testing this is SQL Plus with statements similar to the following example using two SQL Plus sessions:

Session 1:

SELECT * FROM TESTTABLE WHERE ID = 'AAA' FOR UDPATE; SAVEPOINT A;
SELECT * FROM TESTTABLE2 WHERE ID = 'BBB' FOR UDPATE; Session 2:
SELECT * FROM TESTTABLE2 WHERE ID = 'BBB' FOR UPDATE; (this of course goes into a wait status)

Session 1:
ROLLBACK TO A; This statement is supposed to release the row lock that occured after savepoint A. It does, to the extent that a third process can now lock that row. However, the second session stays in a wait status until the entire transaction in session 1 is ended with a COMMIT or a ROLLBACK (without the TO SAVEPOINT clause). If the ROLLBACK TO A statement truely is releasing the row lock, I would expect session 2 to select and lock the row. Why doesn't this occur?

Thanks in advance for any response!!

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Fri Jul 11 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US