<p></p>
<h3>Description</h3>
<p>SQL queries that do not return a result set (such as INSERT, DELETE, UPDATE) always report errors when using db_unixodbc.  The query succeeds, but the log indicates a failure.</p>
<h4>Reproduction</h4>
<p>Use db_unixodbc.so for sql queries.<br>
Issue a valid query such as INSERT that is not expected to return a result set.</p>
<h4>Log Messages</h4>
<p>ERROR: db_unixodbc [res.c:52]: db_unixodbc_get_columns(): no columns returned from the query<br>
ERROR: db_unixodbc [res.c:253]: db_unixodbc_convert_result(): getting column names failed<br>
ERROR: db_unixodbc [dbase.c:271]: db_unixodbc_store_result(): failed to convert result<br>
ERROR:  [db_query.c:197]: db_do_raw_query(): error while storing result<br>
ERROR: sqlops [sql_api.c:297]: sql_do_query(): cannot do the query [DELETE FROM mytable WHERE id = 1]</p>
<h3>Additional Information</h3>
<p>Kamailio Version 5.5.0</p>
<p>This issue was also reported to SR-users, but that user did not open an issue. (See <a href="https://lists.kamailio.org/pipermail/sr-users/2018-March/100581.html" rel="nofollow">https://lists.kamailio.org/pipermail/sr-users/2018-March/100581.html</a>)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2810">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZO77ABOJXFWVMXLKU3T2LGGVANCNFSM5BI2LNVA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZPTUE2IJUSO64ZWTDDT2LGGVA5CNFSM5BI2LNVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4OIJCOYA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2810",
"url": "https://github.com/kamailio/kamailio/issues/2810",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>