dbTalk Databases Forums  

Intent locks not blocking each other?

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss Intent locks not blocking each other? in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
tvmonster
 
Posts: n/a

Default Intent locks not blocking each other? - 10-13-2010 , 07:08 AM






Hi,

I am trying to use intent locks within a transaction over multiple
sessions.
The documentation seems to say that one intent lock does allow other
sessions to read the record but not to create another intent lock.
However when I try that, all intent locks seem to be successful.

In session1 (within a transaction) I create an intent lock by either:
select id, c from tab holdlock where id = 1
or
select id, c from tab where id = 1 for update by lock

This does create a lock, updating the record does block, but when I
issue the same select statements in session2 (also in a transaction)
to get (or wait for) an intent lock, the lock also seems to be created
for session2, the select returns immediately, i would expect the
second select to block until the first session transaction is ended.

I am using sybase ianywhere 11

Any idea what I am doing wrong or how to get a blocking state for the
second session?

Rob Gansevles

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.