MySQL Forums
Forum List  »  InnoDB

Re: Not locking....
Posted by: Lalit Shakya
Date: September 28, 2008 10:09PM

I think this may help you. Better is that write this code in function or procedure
if your AUTOCOMMIT=1; then it


SET AUTOCOMMIT=0;

LOCK TABLES table name WRITE (or Read if your required only select)
Start transaction
begin
SELECT * FROM `data` WHERE `page` = 'menu' LIMIT 3 LOCK IN share mode;
end
UNLOCK TABLES;
commit

Options: ReplyQuote


Subject
Views
Written By
Posted
2988
September 22, 2008 01:34AM
1673
September 28, 2008 08:27PM
1687
September 29, 2008 05:03AM
1648
September 29, 2008 06:53PM
1649
October 04, 2008 06:03AM
Re: Not locking....
1556
September 28, 2008 10:09PM


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.