[sr-dev] db_mysql MYSQL_TYPE_TIMESTAMP conversion

smititelu stefan.mititelu at 1and1.ro
Wed Jun 24 16:35:40 CEST 2015


Hello,

I have a question related to the location table's "last_modified" column 
type.

The standard type is _datetime_. However, when the actual database type 
is _timestamp_ (not the standard type), db_mysql_get_columns() in 
modules/db_mysql/km_res.c interprets the values as _int_ (see case 
MYSQL_TYPE_TIMESTAMP||). Eventually an "error while converting rows" 
error is dumped. Is this conversion on purpose?

On the other hand, check_result() in modules/db_mysql/my_cmd.c 
interprets _timestamp_ as _datetime_. Everything works fine when 
_timestamp_ is converted to _datetime_ in db_mysql_get_columns() .

Regards,
Stefan
||
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150624/318b2034/attachment.html>


More information about the sr-dev mailing list