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

Juri Haberland juri at sapienti-sat.org
Fri Jun 24 11:50:44 PDT 2016


On 24.06.2016 15:18, Robert at QuantumRadio wrote:
> Following up,
> I opted to change this line in opendmarc-expire to
> 
> $dbi_s = $dbi_h->prepare("DELETE FROM requests WHERE lastsent <=
> DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL ? DAY) AND NOT lastsent =
> '1970-01-01 00:00:00'”);
> 
> I note too that the last six 0’s (zeros) have : between them, and not my
> previous 00.00.00
> 
> This should allow me to run MySql without the switches - which may break
> something else.?

I have no idea - need to check the scripts.

Maybe an option is to revert your changes and prepend all relevant sessions
in the scripts with something like:
SET SESSION sql_mode =
'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

Which is essentially your default minus NO_ZERO_DATE.
Then it is only valid for the sessions started by OpenDMARC scripts.


  Juri



More information about the opendmarc-users mailing list