Jay Sprenkle wrote:
> On 6/7/06, Bill KING <[EMAIL PROTECTED]> wrote:
>> I understand why I'm getting the deadlock now, lazy locking, (it's
>> against the logical grain of transaction/locking, but that's a whole
>> other argument) . Maybe this should be highlighted with big arrows in
>> the information around multi-threading, as starvation/deadlock happens
>> and often, especially if you get the scenario:
>>
>> begin                                           begin
>> write (fail because of read lock)       write ( busy deadlock)
>> commit (fail, busy, read lock).          commit (fail, busy, deadlock).
>
> Why are you putting transactions around single sql statements?
> There seems to be no benefit to it.
>
Because it's not a single statement, it's several levels of tables, and
the whole operation needs to be atomic for system consistency. Which is,
essentially what transactions are for.

-- 
Bill King, Software Engineer
Trolltech, Brisbane Technology Park
26 Brandl St, Eight Mile Plains, 
QLD, Australia, 4113
Tel + 61 7 3219 9906 (x137)
Fax + 61 7 3219 9938
mobile: 0423 532 733

Reply via email to