[asterisk-dev] [Code Review] 3980: cel_odbc: Add microseconds precision in the eventtime column
Etienne Lessard
reviewboard at asterisk.org
Sat Nov 15 10:51:54 CST 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3980/
-----------------------------------------------------------
(Updated Nov. 15, 2014, 10:51 a.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers.
Changes
-------
Committed in revision 427952
Bugs: ASTERISK-24283
https://issues.asterisk.org/jira/browse/ASTERISK-24283
Repository: Asterisk
Description
-------
This patch adds microsecond precision when inserting a CEL record into a table with an "eventtime" column of type timestamp, instead of second precision. The documentation (configs/cel_odbc.conf.sample) was already saying that the eventtime column included microseconds precision, but that was not the case.
Also, without this patch, if you had a table with an "eventtime" column of type varchar, you had millisecond precision. With this patch, you also get microsecond precision in this case.
Diffs
-----
/branches/11/cel/cel_odbc.c 422682
Diff: https://reviewboard.asterisk.org/r/3980/diff/
Testing
-------
Tested with postgres 9.1 and mysql 5.5.
With postgres, with a CEL table with an "eventtime" column of type timestamp, you get microsecond precision. Same for a CEL table with an "eventtime" column of type varchar.
With mysql, with a CEL table with an "eventtime" column of type timestamp, you still get only second precision, because mysql 5.5 don't store it ( http://dev.mysql.com/doc/refman/5.5/en/fractional-seconds.html ). That said, it's not causing any problem. For a CEL table with an "eventtime" column of type varchar, you do get microsecond precision.
Thanks,
Etienne Lessard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141115/1f1a1eac/attachment.html>
More information about the asterisk-dev
mailing list