Hi,

Using oxi 1.16.3, FreeBSD-11, mysql-5.6.34.
Setting up the simplest configuration as offered in Quickstart guide.

Trying to write to the table application_log, oxi server says:
'Out of range', when writing timestamp to the database.

webui.log:

Server Error Msg: $VAR1 = {
           'LIST' => [
                       {
                         'LABEL' =>
'I18N_OPENXPKI_SERVER_DBI_DBH_EXECUTE_FAILED',
                         'PARAMS' => {
                                       '__ERRNO__' => '1264',
                                       '__QUERY__' => 'insert into
application_log(application_log_id, logtimestamp, workflow_id,
category, priority, message) values (?, ?, ?, ?, ?, ?)',
                                       '__ERRVAL__' => 'Out of range
value for column \'logtimestamp\' at row 1'
                                     }
                       }
                     ],
           'SERVICE_MSG' => 'ERROR'
         };


On one hand, subroutine __get_current_utc_time() returns a timestamp, 
which is a 20-decimal-digit number
(see: core/server/OpenXPKI/Server/Log/Appender/DBI.pm)

On the other hand, field logtimestamp in the table application_log has 
type "bigint(20) unsigned".

But parameter in parentheses (20) is not the quantity of decimal digits 
in the timestamp. It is 'the maximum display width for integer types', 
which 'is unrelated to the range of values a type can contain'. Cf.: 
https://dev.mysql.com/doc/refman/5.6/en/numeric-type-overview.html in 
the very beginning of this document.

Moreover, the maximal value of type "bigint unsigned" equals to 
18446744073709551615. Cf: 
https://dev.mysql.com/doc/refman/5.6/en/integer-types.html
For our mask of timestamp (see: 
core/server/OpenXPKI/Server/Log/Appender/DBI.pm) is corresponds to the 
year of 1844. No year later than 1844 could be written to the database 
this way.

Thank you for any advice about this deadlock ahead of time.

All the best, Sergei

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenXPKI-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openxpki-users

Reply via email to