[opendmarc-users] DELETE failed error. What is causing this?

Robert@QuantumRadio robert at quantum-radio.net
Fri Jun 24 06:08:16 PDT 2016


I see that. I will add the switch to the my.cnf as the docs say that’s possible. or failing that, to the startup.
However, having set the database default structure to that stated below.


Name         Type      Collation          Attributes         Null  Default
lastsent       datetime                                               Yes   1970-01-01 00.00.00

I would have thought it would be enough for it to now not to have 0000-00-00 00:00:00 in the table, but instead 1970-01-01 00.00.00

or I’m still missing something fundamental here.


also, I’ve got an idea I’ve seen this reported as an issue sometime previously?

Robert  <https://quantum-radio.net/phpMyAdmin/sql.php?db=opendmarc&table=requests&token=89369c42e6ba2e052930f40cd14b23b8&goto=tbl_structure.php&back=tbl_structure.php&sql_query=SELECT+COUNT%28%2A%29+AS+%60Rows%60%2C+%60lastsent%60+FROM+%60requests%60+GROUP+BY+%60lastsent%60+ORDER+BY+%60lastsent%60&is_browse_distinct=1> 




 <https://quantum-radio.net/phpMyAdmin/sql.php?db=opendmarc&table=requests&token=89369c42e6ba2e052930f40cd14b23b8&goto=tbl_structure.php&back=tbl_structure.php&sql_query=SELECT+COUNT%28%2A%29+AS+%60Rows%60%2C+%60lastsent%60+FROM+%60requests%60+GROUP+BY+%60lastsent%60+ORDER+BY+%60lastsent%60&is_browse_distinct=1>




> On 24 Jun 2016, at 13:06, Juri Haberland <juri at sapienti-sat.org> wrote:
> 
> On 2016-06-24 11:42, Robert at QuantumRadio wrote:
>> hmm.
> 
>> So I have NO_ZERO_DATE set, but something in import/report/expire must
>> be setting the 0 date into the database in the first place I think.
> 
> The table is defined to have a default value of '0000-00-00 00:00:00' for the column 'lastsent'.
> So whenever a new row is created that has no value for 'lastsent' the MySQL server uses '0000-00-00 00:00:00'.
> 
>> I’ve set the database - datetime NULL DEFAULT '1970-01-01’
>> But it doesn’t seem to make a difference.
> 
> No, because the table is defined differently - see above.
> 
>> So perhaps I should restart mysql without the NO_ZERO_DATE option set?
> 
> I'm in no way a MySQL expert, but from reading http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-changes it seems that having columns defined with DEFAULT '0000-00-00 00:00:00' was quite common and possible with MySQL < 5.7.
> 
> So I would recommend to start your MySQL server without NO_ZERO_DATE and from reading the docs it will just work as it worked with older versions of MySQL.
> 
>> but that will cause it to fail if the opendmarc-reporting system
>> tries to input a non-valid date
> 
> Why should it fail? '0000-00-00 00:00:00' is not an invalid date if the sql_mode does not include NO_ZERO_DATE.
> 
>> Or should I find where it’s being input in the code?
> 
> It's in the mysql-template file that was used to create the database for OpenDMARC.
> Please open a bug and report this issue, so it can be dealt with in later releases.
> 
> 
> Cheers,
>  Juri
> _______________________________________________
> opendmarc-users mailing list
> opendmarc-users at trusteddomain.org
> http://www.trusteddomain.org/mailman/listinfo/opendmarc-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.trusteddomain.org/pipermail/opendmarc-users/attachments/20160624/87b88e43/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dot.gif
Type: image/gif
Size: 43 bytes
Desc: not available
URL: <http://www.trusteddomain.org/pipermail/opendmarc-users/attachments/20160624/87b88e43/attachment.gif>


More information about the opendmarc-users mailing list