MySQL Forums
Forum List  »  InnoDB

Re: Locking certain rows in a transaction
Posted by: Shlomi Noach
Date: August 29, 2008 12:22PM

Hi,

On InnoDB tables, you do:
START TRANSACTION;
SELECT ... FROM my_innodb_table WHERE ... FOR UPDATE;
...
COMMIT;

Until the transaction is comitted, no one can read nor change the rwos you have selected.

Shlomi

Options: ReplyQuote


Subject
Views
Written By
Posted
2907
August 09, 2008 06:05AM
Re: Locking certain rows in a transaction
1894
August 29, 2008 12:22PM


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.