[asterisk-bugs] [JIRA] (ASTERISK-28065) res_odbc: missing SQL error diagnostic

Asterisk Team (JIRA) noreply at issues.asterisk.org
Mon Dec 3 17:31:52 CST 2018


     [ https://issues.asterisk.org/jira/browse/ASTERISK-28065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asterisk Team updated ASTERISK-28065:
-------------------------------------

    Target Release Version/s: 16.1.0

> res_odbc: missing SQL error diagnostic
> --------------------------------------
>
>                 Key: ASTERISK-28065
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28065
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_odbc
>    Affects Versions: 13.23.0
>         Environment: Linux Slackware-64 14.2 
> unixODBC 2.3.7pre
> mysql-connector-odbc 5.3.11
> mysql 5.6.41
>            Reporter: Alexei Gradinari
>            Assignee: Alexei Gradinari
>      Target Release: 13.24.0, 15.7.0, 16.1.0
>
>
> On SQL error there is not diagnostic information about this error.
> There is only
> WARNING res_odbc.c: SQL Execute error -1!
> The function ast_odbc_print_errors calls a SQLGetDiagField to get the number of available diagnostic records, but the SQLGetDiagField returns 0.
> However SQLGetDiagRec could return one diagnostic records in this case.
> Looking at many example of getting diagnostics error information I found out that the best way it's to use only SQLGetDiagRec while it returns SQL_SUCCESS.



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



More information about the asterisk-bugs mailing list