LP #1316863: pt-table-checksum doesn't work on pxc 5.6

Description

**Reported in Launchpad by Ben Mildren last update 03-09-2014 17:01:55

  • pt-table-checksum --recursion-method=cluster

  • 2.2.7

  • pxc 5.6.15

https://bugs.launchpad.net/percona-xtradb-cluster/+bug/1263991

With PXC 5.6 the session binlog_format cannot be changed to STATEMENT:

mysql> /!50108 SET @@binlog_format := 'STATEMENT'/;
ERROR 1231 (42000): Variable 'binlog_format' can't be set to the value of 'STATEMENT'
mysql>

Therefore pt-table-checksum fails with the message:

Failed to /!50108 SET @@binlog_format := 'STATEMENT'/: DBD::mysql::db do failed: Variable 'binlog_format' can't be set to the value of 'STATEMENT' [for Statement "/!50108 SET @@binlog_format := 'STATEMENT'/"] at /usr/bin/pt-table-checksum line 9101, <STDIN> line 1.

This tool requires binlog_format=STATEMENT, but the current binlog_format is set to ROW and an error occurred while attempting to change it. If running MySQL 5.1.29 or newer, setting binlog_format requires the SUPER privilege. You will need to manually set binlog_format to 'STATEMENT' before running this tool.

There doesn't seem to be any workaround for this using the current options.

Environment

None

Smart Checklist

Activity

Show:

lpjirasync January 24, 2018 at 8:15 PM

**Comment from Launchpad by: Frank Cizmich on: 03-09-2014 17:01:54

PXC 5.6.20 has been released and is now once again compatible with pt-table-checksum, allowing the setting of binlog_format at runtime.

lpjirasync January 24, 2018 at 8:15 PM

**Comment from Launchpad by: Frank Cizmich on: 26-08-2014 22:29:12

UPDATE

I've commited a branch that implements the workaround I mentioned before.

setting the --pxc56 option signals pt-table-checksum to set wsrep_forced_binlog_format = 'statement' at start .

It reverts the setting when it finishes or on any other exit condition.

https://code.launchpad.net/~percona-toolkit-dev/percona-toolkit/pt-table-checksum-pxc56-workaround

This is highly unsafe, meant to be used experimentally only!

lpjirasync January 24, 2018 at 8:15 PM

**Comment from Launchpad by: Frank Cizmich on: 21-08-2014 21:12:39

pt-table-checksum as it stands now relies on being able to set binlog_format = "STATEMENT". It cannot work without this.
PXC 5.6 has disabled this while PXC 5.5 permitted it, though issuing a warning.
We are looking at various alternatives for getting them to work together again, but it is necessary to be careful since galera library is relying on binlog_format=ROW to ensure consistency.

That being said, there is a "dirty" workaround for this which involves commenting out the code mentioned by Marc and setting the global variable wsrep_forced_binlog_format = statement.

But this is very risky and so defeats the purpose. So ultimately not recommended.

If you DO try it remember to set the variable back to the value "NONE" afterwards.

lpjirasync January 24, 2018 at 8:15 PM

**Comment from Launchpad by: Marc Castrovinci on: 18-08-2014 18:58:43

Is no one else concerned there is no way to actually verify cluster consistency???

lpjirasync January 24, 2018 at 8:15 PM

**Comment from Launchpad by: Joel on: 13-08-2014 20:27:34

I am also looking for an alternative for this tool. Is there anything else out there? Any plans for a fix? Having the same problem here.

Done

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 24, 2018 at 8:15 PM
Updated January 24, 2018 at 8:15 PM
Resolved January 24, 2018 at 8:15 PM