Ruby on Rails
Tuesday, April 3, 2012
Hi Scott,
Thanks. In case it helps others, it is explained here:
http://stackoverflow.com/questions/6690458/innodb-select-for-update-statement-locking-all-rows-in-a-table
Setting transaction to Read Committed did not work for me though, but creating an index on UpdateLockForFoo did the trick.
Thanks!
On Tuesday, April 3, 2012 4:42:12 PM UTC+1, Scott Ribe wrote:
On Apr 2, 2012, at 4:33 PM, PierreW wrote:--> My
> understanding was that :lock => true only locks a specific record, but
> it seems it is not the case and it locks the entire table.That depends on what kind of locking the underlying database offers. Which with MySQL depends on the storage manager you're using.
--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/RwdXaau3WIEJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment