Re: Question about locks places on a row...
Posted in 1997
On Wed, 30 Jul 1997 17:14:46 GMT, mickm@netcom.com (Mickey Mestel) wrote: Dear Mickey, It you are using version 5.0 online it also locks adjacent keys. If you are using v7 this does not happen. But if you have a referential constraint (primary/foreign keys) and update the primary table a lock is placed on the refering table to stop anyone messing with it and invalidating the referential constraint. HTH, Jason >hi all, > > a quick question> when i begin a transaction, update a row, but don't >commit and then look at the locks, i have the following: > > ... HDR+X 1000dd 10e K- 1 > ... HDR+X 1000dd 10e K- 1 > ... HDR+X 1000dd 10e 0 > ... HDR+IX 1000dd 0 0 > > now the IX lock is an intent lock on the table, as we are locking >specific rows, we can't allow anyone to lock a page that the row is on, or the >table itself. the X lock with the key#/bsiz of 0 is the row itself, and the >k- 1 is for the key of the index. but here is the question, there is only >one index of one column on this table, so why are there two key locks? > > i have tested this a number of times, and it comes up the same, so >it appears to be usual behaviour, but what is the story here? > > any help is appreciated. > > thanks, > > mickm > >-- > >_____________________________________________________________________________ >Mickey Mestel mickm@netcom.com > >-on a beach in thailand to a beautiful, stoned, norwegian woman: > "..yeah, it's just another foreign country without ice." >-----------------------------------------------------------------------------