[sr-dev] git:master: modules_k/presence Fixed DB Storage Modes

Klaus Darilion klaus.mailinglists at pernau.at
Mon Feb 20 15:12:22 CET 2012



On 20.02.2012 14:47, Anca Vamanu wrote:
>
> On 02/20/2012 03:26 PM, Klaus Darilion wrote:
>> Is the SELECT really necessary? If only UPDATE is done, and UPDATE
>> returns '0 rows' affected then respond with 412.
>>
> If only it were like this :) . I have asked about this behavior long
> time ago. Unfortunately the DB API of kamailio does not say '0 rows
> affected' when update is performed. It says only if the update was
> successful or not. No indication if it has actually found a match or
> not. And actually I don't see this possibility in the mysql library either:
>
> http://dev.mysql.com/doc/refman/5.0/en/mysql-real-query.html

It should work with:
http://dev.mysql.com/doc/refman/5.0/en/mysql-affected-rows.html

klaus



More information about the sr-dev mailing list