[Dbix-class] How to
Alex Erzin
eaa-home at yandex.ru
Wed Jun 20 09:24:35 GMT 2012
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
>>> I still don't understand the UPDATE vs INSERT issue.
>> In his first mail he told us that a user has to seelct a minimum value from
>> some table. That has to be valid until the insert committed. He wants to
>> avoid a second user in receiving the same minimum value.
>>
>> His idea was to lock the table for reading until the insert is done, which
>> would create a new minimum value.
>
> SELECT FOR UPDATE locks for UPDATE, not for INSERT, according to the manual.
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
--
eaa@
More information about the DBIx-Class
mailing list