maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #00859
Silencing "Unsafe statement written to the binary log" log warnings
Hi.
We get 500k such lines per day:
130517 0:00:02 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. Statement: UPDATE [...]
Is there a way to silence them ?
Intuitively, I would expect a companion option to
innodb_locks_unsafe_for_binlog, but couldn't find one in the documentation.
The queries triggering those warnings are harmless in our case because
the update is rolled back at application level on restart (which
necessarily happens in case of disaster recovery involving restoring
incremental backups).
If you want more details to understand what we are doing - shouldn't be
needed for this discussion: The table involved is used as a shared task
queue. The update happens when a process wants to process a bunch of
tasks, up to a limit. Once a task is over, it is deleted by its primary
key. So any task assigned to a worker's identifier upon worker startup
can be safely assumed to have to be processed, and is released by that
worker (effectively rolling back UPDATE's action).
This only represents 2MB gzipped, so we can live with it if we must, but
it causes undesired noise which may hide real issues.
Regards,
--
Vincent Pelletier
ERP5 - open source ERP/CRM for flexible enterprises
Follow ups