BUG: READPAST Locking Hint Returns an Incorrect Number of Rows (297466)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q297466
BUG #: 353808 (SHILOH_BUGS)
SYMPTOMS
If the first row passed to the Bookmark Lookup operator is locked, a query that contains the READPAST locking hint returns an incorrect number of rows. Refer to the "More Information" section for an example.
CAUSE
The READPAST hint does not read past the row identifier (RID) lock but does read past the KEY lock.
Without a clustered index the UPDATE statement takes a row identifier type of lock. With a clustered index, the UPDATE statement takes a KEY lock. You use a row identifier lock to lock a single row within a table. A KEY lock is a row lock within an index. You use a KEY lock to protect key ranges in serializable transactions.
WORKAROUND
To work around this behavior, add a clustered index to the table.
STATUS
Microsoft has confirmed this to be a problem in SQL Server 2000.
Modification Type: | Major | Last Reviewed: | 10/3/2003 |
---|
Keywords: | kbBug kbpending KB297466 |
---|
|