pt-table-sync generates lots of errors in MariaDB logs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When running pt-table-sync, MariaDB outputs lots of errors like the following:
Jan 13 15:01:01 server mysqld: 140113 15:01:01 [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 xyz set [...] LIMIT 1
Version: pt-table-sync 2.2.6
cmdline: /usr/bin/
Server: MariaDB 5.5.34.
Update clauses which don't use order by shouldn't have limit specified as the order of the row returned, thus the rows which will be affected, can't be determined. Though this is reported on MariaDB, it'll be the same issue with MySQL.
tags: | added: pt-table-sync |
I fixed this by removing the "LIMIT" clause from pt-table-sync code.
To do this on Ubuntu, open: pt-table- sync
nano /usr/bin/
Search for "UPDATE $self->{dst_db_tbl} SET" and remove "LIMIT" from this statement.