[Maria-discuss] 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
I forgot: please keep me CC'ed in replies, I'm not subscribed to this list. -- Vincent Pelletier ERP5 - open source ERP/CRM for flexible enterprises
Hi, Vincent! On Jun 25, Vincent Pelletier wrote:
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.
Try --log-warnings=0 Regards, Sergei
Am 25.06.2013 18:19, schrieb Sergei Golubchik:
On Jun 25, Vincent Pelletier wrote:
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.
Try --log-warnings=0
"binlog-format=MIXED" would be smarter https://kb.askmonty.org/en/binary-log-formats/
participants (3)
-
Reindl Harald
-
Sergei Golubchik
-
Vincent Pelletier