Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: OCIStmtExecute on an update query locks...
On 21 Feb 2006 00:46:41 -0800, "Herode" <cbrun_at_geomapgis.com> wrote:
>Yes, you're right ! The key problem was a session started and not
>closed on a previous test. This lost session locked the rows, hence the
>OCIStmtExecute.
>Thanks !
>
>PS : One could wonder why Oracle does not deliver any error or
>information message on such occasions, instead of sticking on the
>function call... ?
Because it's not an error that a statement has to wait for a lock. The lock will be released by the other session eventually, and so the statement can proceed.
If you were to get into a situation where it's impossible to get a lock - i.e. a deadlock - then an error _is_ raised, as Oracle detects this.
If you want a timeout, then you have to code it yourself, e.g. with alarm() and OCIBreak() in a SIGALRM handler, or using non-blocking mode and polling.
-- Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis toolReceived on Wed Feb 22 2006 - 12:31:07 CST
![]() |
![]() |