[Dbix-class] How to

Len Jaffe lenjaffe at jaffesystems.com
Wed Jun 20 15:00:13 GMT 2012


On Wed, Jun 20, 2012 at 5:24 AM, Alex Erzin <eaa-home at yandex.ru> wrote:

> According to manual it locks "from reading the data", here are no words
> about insert or update at _read_ time.
>
> 19.06.2012, 17:28, "Dave Howorth" <dhoworth at mrc-lmb.cam.ac.uk>:
> > Joerg Braun wrote:
> >
> >>  On Tue, 19 Jun 2012 10:26:19 +0100, Dave Howorth
>
> >
> > SELECT FOR UPDATE locks for UPDATE, not for INSERT, according to the
> manual.
> According to manual it locks "from reading the data", here are no words
> about insert or update at _read_ time.


The whole point of SELECT FOR UPDATE is that you get the requisite locks on
those records so only you can update them. If you've got write-locks on
those records, other's may be able to read them (if the right consitency
level is set) but they won't be able to obtain read-locks or write-locks
until you relinquish yours - via commit or rollback.

L.

-- =

lenjaffe at jaffesystems.com   614-404-4214             www.volunteerable.net
Proprietor: http://www.theycomewithcheese.com/ - An Homage to Fromage
Greenbar <http://www.greenbartraining.org/>: Grubmaster: 2012-2009, Grub
Asst: 2008, Trained: 2007.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20120620/1c4=
348b1/attachment.htm


More information about the DBIx-Class mailing list