On 11/22/11 11:54 AM, Stephen Dodge (Bistech) wrote:
Thanks Daniel, I just needed to cast the NULL before returning it
from my MySQL function.
cast(NULL as unsigned integer)
ok, good hint. I guess MYSQL_TYPE_NULL is returned as type for such
cases -- I assume the type is not a valid one to define columns, but
used for returned values from functions and procedures, also probably
for views with columns defined null always.
It may be an option to map internally in db_mysql module the
MYSQL_TYPE_NULL to integer type -- the value should have the null flag
set as well.
Cheers,
Daniel
Regards
Steve
*From:*Daniel-Constantin Mierla [mailto:miconda@gmail.com]
*Sent:* 18 November 2011 09:40
*To:* SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
Users Mailing List
*Cc:* Stephen Dodge (Bistech)
*Subject:* Re: [SR-Users] FW: db_mysql -> unhandled data type column
Hello,
On 11/18/11 9:46 AM, Stephen Dodge (Bistech) wrote:
Hello,
I thought I'd post this again just in case anyone has some
suggestions. Apologies if this is a basic question!!
We are using Kamailio 3.1.5 in production. We use the sqlops module
to run a mysql function to return parameters. In the logs I am
seeing the flowing warnings.
/usr/sbin/kamailio[3991]: WARNING: db_mysql [km_res.c:143]: unhandled
data type column (diallednumber) type id (6), use DB1_STRING as default
/usr/sbin/kamailio[3991]: WARNING: db_mysql [km_res.c:143]: unhandled
data type column (ringtime) type id (6), use DB1_STRING as default
I think these are generated when we return a null value, although
this is not causing us a problem can anyone advise how to eliminate
these warnings.
what are the definitions of the columns diallednumber and ringtime in
the database table?
The log message is not related to value, but to the column's data
type, which is not recognized by db_mysql, thus the value is stored as
string in the result array.
Cheers,
Daniel
--
Daniel-Constantin Mierla --http://www.asipto.com
Kamailio Advanced Training, Dec 5-8,
Berlin:http://asipto.com/u/kat
http://linkedin.com/in/miconda --
http://twitter.com/miconda
------------------------------------------------------------------------
Information in this message, including any attachments, is
confidential to the person to whom it is addressed and may be legally
privileged. If you are not the intended recipient please notify the
sender and delete the message from your system. Please note that
Bistech Group plc, Bistech plc, Bisnet Limited and the sender do not
accept any responsibility for viruses. It is your responsibility to
check the e-mail and any attachments for viruses. Calls may be
monitored and recorded.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla --
http://www.asipto.com
Kamailio Advanced Training, Dec 5-8, Berlin:
http://asipto.com/u/kat
http://linkedin.com/in/miconda --
http://twitter.com/miconda