|Summary:||ASTERISK-18252: queue_log mysql time column data format|
|Reporter:||Gareth Blades (gblades_skymarket)||Labels:|
|Date Opened:||2011-08-10 08:12:06||Date Closed:||2015-06-23 09:44:43|
|Description:||I have configures mysql with the logging of queue information to the queue_log table using the schema supplied in the contrib directory.|
When I reload asterisk I get the following error :-
res_config_mysql.c:1262 require_mysql: Realtime table queue_log@skycom: Column time cannot be a datetime
Ok so maybe the information I saw that asterisk 1.8 stores teh date as a timestamp instead of an epoch was wrong so I change the data type to an int but I then get this :-
Realtime table skycom@queue_log: column 'time' cannot be type 'int(11)' (need datetime)
So its not allowing it to be datetime but when I set it to an int it tells me thats wrong and it should be set to datetime!
What should it be set to?
Can the error be fixed telling me to change it to a datetime when thats not acceptable.
I know I can probably change it to a char() field but I am going to need to do a lot of searching on that value and storing it as a char is incredibly inefficient
|Comments:||By: Ole Kaas (ole.kaas) 2011-12-27 08:40:27.871-0600|
Seems to happen if you configere extconfig.conf to log queue cdr to database and issue a 'reload extconfig' from CLI. The log will state wrong time column format and missing 'data' column. Changing time to CHAR(50) and add 'data' column CHAR(50) - entries will show up in the table. And * will keep barfing in the log about wrong 'time' column format. That is, until at 'queue reload all' is issued. Then data will go into 'data<n>' and 'data' is empty - and no more barfing in the log :)
By: Rusty Newton (rnewton) 2015-05-17 14:02:44.945-0500
Gareth please test out the patch here: https://gerrit.asterisk.org/#/c/420/ and report back if possible.
It is available via Gerrit in the 11,13 and Master branches.
By: Rusty Newton (rnewton) 2015-06-23 09:44:43.444-0500
Closing this out since it is against 1.8.
If the issue exists in a currently supported version then please submit a new issue along with debug demonstrating the issue and a reproduction guide.