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

Friendly Automation (JIRA) noreply at issues.asterisk.org
Fri Sep 28 10:40:54 CDT 2018


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

Friendly Automation commented on ASTERISK-28065:
------------------------------------------------

Change 10284 merged by Kevin Harwell:
res_odbc: fix missing SQL error diagnostic

[https://gerrit.asterisk.org/10284|https://gerrit.asterisk.org/10284]

> 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
>
> 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