[asterisk-bugs] [JIRA] (ASTERISK-25032) cel_odbc sometimes inserts CEL with wrong eventtime
Etienne Lessard (JIRA)
noreply at issues.asterisk.org
Wed Apr 29 07:53:33 CDT 2015
Etienne Lessard created ASTERISK-25032:
------------------------------------------
Summary: cel_odbc sometimes inserts CEL with wrong eventtime
Key: ASTERISK-25032
URL: https://issues.asterisk.org/jira/browse/ASTERISK-25032
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: CEL/cel_odbc
Affects Versions: 13.3.2, 11.17.1
Reporter: Etienne Lessard
Severity: Minor
Given I have a postgresql server with a "cel" table with a column "eventtime" of type timestamp
Given I have cel_odbc configured to insert CEL in the "cel" table of my postgresql server
When a CEL (struct ast_cel_event_record) is generated with eventtime.tv_usec between 1 and 99999, inclusively
Then the record inserted in postgresql has the wrong eventtime
For example, a CEL created at 1430309985.000009 will be inserted in postgresql with an eventtime of 1430309985.9.
I took postgresql as an example, but the bug will show up for any DBMS with timestamp with sub-second precision.
The bug does not show up if the column "eventtime" is of time varchar instead of timestamp.
I wrote a small module to do some manual test: https://github.com/elessard1/asterisk-lab/blob/cel-odbc-wrong-eventtime/lab.c
After compiling and loading the module, you can call "lab cel <us>" from the CLI, and it will generate a dummy CEL event with the given microsecond part.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list