Failed to debug with utf8 chars

Bug #1666531 reported by Elbandi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
New
Undecided
Unassigned

Bug Description

Database and tables are utf8 compatible, and there are record different on master and slave, and it contains utf8 chars. (sample master: "Árvíztűrő tükörfúrógép", slave: "arvizturo tukorfurogep")

If i run pt-table-sync with --charset utf8 parameters, and debug is enabled (PTDEBUG=1), perl stop with following error:
# ChangeHandler:3580 18123 Fetching data on dbh DBI::db=HASH(0x1a55970) for REPLACE : SELECT `id`, `mezo1`, `mezo2` FROM `table` WHERE `id`='987918' LIMIT 1
# ChangeHandler:3432 18123 Wide character in print at /usr/bin/pt-table-sync line 3690. while doing table on 1.2.3.4

My quick fix: setup stderr to utf8 compatible, i put this to the pt-table-sync begin:

use utf8;
binmode(STDERR, ":utf8");

Revision history for this message
Carlos Salguero (carlos-salguero) wrote :

Hi,

Thanks for reporting the error AND the solution.
If you like, you can submit the patch via a new pull request to the Github repo and I can test it an merge it and I will add the fix with your name in the changelog.

If you are willing to do that, please read the contributing guide. There you will find information about how to contribute with code.

Regards

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1413

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.