pt-table-checksum - Unsafe statement written to the binary log using statement format
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Incomplete
|
Medium
|
Frank Cizmich |
Bug Description
pt-table-checksum sets binlog_
140131 10:46:00 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. Statement: REPLACE INTO `percona`
This is fixed in PS 5.5.32-31.0 as long as we also include an ORDER BY on a PK column.
So this request is to add:
ORDER BY `PRIMARY KEY COLUMN`
Thanks
https:/
http://
tags: | added: pt-table-checksum |
Changed in percona-toolkit: | |
assignee: | nobody → Frank Cizmich (frank-cizmich) |
importance: | Undecided → Low |
importance: | Low → Medium |
# pt-table-checksum --version
pt-table-checksum 2.2.9
mysql> SELECT @@version, @@version_comment; ------- --+---- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+ ------- --+---- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+ ------- --+---- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+
+------
| @@version | @@version_comment |
+------
| 5.6.15-56-log | Percona XtraDB Cluster (GPL), Release 25.5, Revision 759, wsrep_25.5.r4061 |
+------
1 row in set (0.00 sec)
2014-07-20 11:10:40 2675 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. Statement: REPLACE INTO `percona` .`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT 'example_db', 'perm_templ_items', '1', NULL, NULL, NULL, COUNT(*) AS cnt, COALESCE( LOWER(CONV( BIT_XOR( CAST(CRC32( CONCAT_ WS('#', `id`, `templ_id`, `perm_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `example_ db`.`perm_ templ_items` /*checksum table*/