MySQL Forums
Forum List  »  Newbie

InnoDB Lockings
Posted by: Leonardo Carreira ☼
Date: May 24, 2009 09:49PM

Hello Friends..

i have a question..
i uses InnoDB Storage engine on MySQL v5.0.81..
i want to use Row Level locking..

if i just want to update/delete some table..
do i have to write "Select.. FOR UPDATE" also?..

example like this : (update data)
START Transaction;
Select * From MyTable FOR UPDATE;
Update MyTable set MyColumn=NewValue;
COmmit;

(delete data)
START Transaction;
Select * From MyTable FOR UPDATE;
Delete From MyTable Where MyColumn=MyValue;
COmmit;

is this true?..
correct me if iam wrong..

Thanks in advance.. :)

Options: ReplyQuote


Subject
Written By
Posted
InnoDB Lockings
May 24, 2009 09:49PM
May 26, 2009 12:48AM


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.