table locks in cursor. how it works?
hello devs
I want to achieve table locks in stored procedure.
I cannot predict which rows are going to be updated as query is built with prepared statement, so I need to lock tables.
In procedure we make temporary view from statement (as mysql doesn't sopport cursor on it) and run cursor on that view.
In the cursor loop I have transaction
start transaction
...
commit
My question is:
Will my tables be locked from reading and modifiying while procedure loops through cursor? And particularly on cursor from view
thanks in advance,
Yurii
Edited 2 time(s). Last edit at 09/24/2012 02:39AM by Yurii Korotia.
Subject
Views
Written By
Posted
table locks in cursor. how it works?
5653
September 24, 2012 02:37AM
2178
September 28, 2012 01:35PM
2028
September 30, 2012 01:53PM
1543
October 01, 2012 07:42PM
1401
October 02, 2012 12:45AM
1358
October 02, 2012 08:33AM
1388
October 03, 2012 03:46PM
1214
October 03, 2012 11:26PM
1425
October 04, 2012 12:12AM
1211
October 04, 2012 08:28AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.