[asterisk-bugs] [JIRA] (ASTERISK-26172) [patch] fix bug when successful sql UPDATE is treated as failed if there is no affected rows.

Asterisk Team (JIRA) noreply at issues.asterisk.org
Mon Jul 4 16:40:56 CDT 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231286#comment-231286 ] 

Asterisk Team commented on ASTERISK-26172:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

> [patch] fix bug when successful sql UPDATE is treated as failed if there is no affected rows.
> ---------------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-26172
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26172
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/Sorcery, Resources/res_config_odbc, Resources/res_realtime
>    Affects Versions: 13.9.1
>            Reporter: Alexei Gradinari
>
> If the SQL UPDATE statement changes nothing then SQLRowCount returns 0.
> This value should be treated as success.
> But the function sorcery_realtime_update treats it as failed.
> This bug was found using stress tests on PJSIP.
> If there are 2 consecutive SIP REGISTER requests with the same contact data  during 1 second then res_pjsip_registrar adds contact location on 1st request and tries to update contact location on 2nd.
> The update fails (because of this bug) and res_pjsip_registrar even removes correct contact location.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list