Re: Is this a Bug or not?
Posted in 1998
--------------0931B017D4E11A5ED7338FDC
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Check your isolation level. To get what you're taking about, you need
repeatable read.
Arun
Sureshkumar Daniel wrote:
> Problem Scenario:
>
> Through one dbaccess session I tried to insert a record into a table
> after giving "Begin work" ( Note: I didnot commit or Rollback )
>
> Through another dbaccess session I tried to insert the same record
> into the same table - I got an error that primary key constraint is
> violated and I also got the ISAM error.
>
> Now if I rolled back the previous "work" - neither of my record made
> it to the database. ( This seems OK - but I have my own reservation as
> to the second session should have been locked till the first one is
> released )
>
>
> Now I wanted to test this scenario and I gave the following command in
> the second dbaccess session before trying to insert the record
> " set lock mode to wait "
>
> Still in the second session my insert command was not waiting for
> the lock to be released ( by the first session ), but went ahead and
> tried to insert the record and came back with the same error.
>
> Is this normal behavior or does other RDBMS behave differently .
>
> Response will be appreciated
>
> -Suresh
>
--------------0931B017D4E11A5ED7338FDC
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
Check your isolation level. To get what you're taking about, you
need
<BR>repeatable read.
<P>Arun
<P>Sureshkumar Daniel wrote:
<BLOCKQUOTE TYPE=CITE> Problem Scenario:
<P>Through one dbaccess session I tried to insert a record into a table
after giving "Begin work" ( Note: I didnot commit or
Rollback )
<P>Through another dbaccess session I tried to insert the <U>same record
into the same table</U> - I got an error that primary key constraint
is violated and I also got the ISAM error.
<P>Now if I rolled back the previous "work" - neither of my record
made it to the database. ( This seems OK - but I have my own reservation
as to the second session should have been locked till the first one is
released )
<BR>
<P>Now I wanted to test this scenario and I gave the following command
in the second dbaccess session before trying to insert the record
<BR>" set lock mode to wait "
<P>Still in the second session my insert command was not waiting
for the lock to be released ( by the first session ), but went ahead and
tried to insert the record and came back with the same error.
<P>Is this normal behavior or does other RDBMS behave differently .
<P>Response will be appreciated
<P>-Suresh
<BR> </BLOCKQUOTE>
</HTML>
--------------0931B017D4E11A5ED7338FDC--