mysql: logging the errors for the build cleanup batch
mysql: using `timestampdiff` instead of `datediff` for compatibility between H2 and MySQL