[opendmarc-users] DELETE failed error. What is causing this?
Juri Haberland
juri at sapienti-sat.org
Fri Jun 24 05:06:38 PDT 2016
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
More information about the opendmarc-users
mailing list