Details
Description
If comparePreviousRecord() is called on some other leaf page than the left-most leaf, and all the rows to the left of the current position are deleted so that the position is moved all the way to slot 0 on the left-most leaf, comparePreviousRecord() will return without releasing the latch on the left-most leaf. Only the leaf on which comparePreviousRecord() is called should be latched when the method returns.
Since comparePreviousRecord() currently fails to continue after finding a deleted row, this bug is not possible to expose until DERBY-4028 is fixed.