[asterisk-dev] [Code Review] 3980: cel_odbc: Add microseconds precision in the eventtime column

Mark Michelson reviewboard at asterisk.org
Thu Sep 18 17:25:08 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3980/#review13353
-----------------------------------------------------------

Ship it!


Ship It!

- Mark Michelson


On Sept. 5, 2014, 7:54 p.m., Etienne Lessard wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3980/
> -----------------------------------------------------------
> 
> (Updated Sept. 5, 2014, 7:54 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> 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/20140918/0cd1d750/attachment.html>


More information about the asterisk-dev mailing list