likely these are some improper logging from the unixodbc module, or
maybe sqlops module asking for storing the result, and unixodbc throwing
error if no data in the result.

You should open an issue on the tracker from github project, so it gets
reviewed and fixed.


On 01.03.18 19:32, Fabian Borot wrote:
> I am using the sqlops module with odbc to INSERT,UPDATE only and as the 
> documentation says I can omit result parameter in "sql_query". However I 
> always see these ERRORS when processing the call:
> This is an example of a query:
> sql_query("c04", "insert into SIPInfo302CDR (SIPCallID,SessionID) 
> values('$ci',$var(SessionID))");
> And these are the error lines in the log:
> ERROR: db_unixodbc [res.c:60]: db_unixodbc_get_columns(): no columns returned 
> from the query
> ERROR: db_unixodbc [res.c:261]: db_unixodbc_convert_result(): getting column 
> names failed
> ERROR: db_unixodbc [dbase.c:216]: db_unixodbc_store_result(): failed to 
> convert result
> ERROR: <core> [db_query.c:188]: db_do_raw_query(): error while storing result
> ERROR: sqlops [sql_api.c:265]: sql_do_query(): cannot do the query [insert 
> into SIPInfo302CDR (SIPCa]
> I have also tried using the parameter like shown below but the ERROR events 
> happen anyways.
> sql_query("c04", "insert into SIPInfo302CDR (SIPCallID,SessionID) 
> values('$ci',$var(SessionID))", "ra"); 
> sql_result_free("ra");
> Even though the errors line show up and say that " cannot do the query .." 
> the query does work and the records are inserted/updated accordingly.
> I tried using the "sql_query_async" function that does not need the result 
> parameter but I can't use it with unixODBC, I see these lines in the log when 
> trying to use it:  "the db driver module doesn't support async query" and the 
> record is not inserted/updated. I also added the "async_workers" core 
> parameter as well just in case.
> I also tried declaring them in the module sqlops initialization section even 
> though in my case there is no need: "modparam("sqlops", "sqlres", "ra")" but 
> the errors show up anyways.
> When I test with  SEELCT query the result parameter can be used, I can count 
> rows etc. But I am only doing INSERT/UPDATE.
> Am I am missing something here or this is something that can be safely used 
> like that and I just need to ignore them. I am using " Kamailio (OpenSER) SIP 
> Server v5.0"
> Thank you
> Fabian
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

Kamailio (SER) - Users Mailing List

Reply via email to