We are trying to put exclusive lock at row level in a stored procude within a BT and ET so the expected fuctionality should be that it should prevent any other connection access to that particular row in that table till the End Transaction happens or there is a roll back. But the result is otherwise there are other connections able to read the particular row from the table even when there is a exclusive lock placed. The same SQL seems to be working fine if it is not part of the SP. The SP is called concurrenlty through multiple java threads.
Any Ideas ?
Example SP Below.
CREATE PROCEDURE TestProc(IN arg1 INTEGER)
BEGIN
BEGIN TRANSACTION;
LOCKING ROW EXCLUSIVE
SELECT col2 FROM table1 WHERE col1 = 1;
UPDATE table1 SET col3 = 5 WHERE col1 = 1 ;
END TRANSACTION;
END;
Forums: