pt-table-checksum inaccurate reports when timezones are different

Bug #912470 reported by Paul Graydon
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Invalid
Undecided
Unassigned

Bug Description

pt-table-checksum was reporting diffs between data on the master and data on the slave, despite numerous attempts to create and re-create the slave.

In the end it turned out to be that because the Master server was set to EST and the slave HST (Master should have been HST like the rest of the servers, something had messed up the tzdata), the returned data from timestamp fields was different. timestamp data is stored as UTC but converted to localtime during select.

You might want to either throw up an error if you can detect that the master & slave are on different timezones, or maybe force the timezone to UTC for your connection through the time_zone variable.

pt-table-checksum version 2.0.1, mysql 5.1.58 on master, 5.1.59 on slave.

Paul Graydon (twirrim)
description: updated
Revision history for this message
Baron Schwartz (baron-xaprb) wrote :

I believe that this should go into the list of sanity-checks we do: check for the timezone, compare, stop with an error message if any differ. The fix for this is to use the --set-vars option to set the time_zone variable for the connections. But in the general case, the DBA should decide whether that's the right fix.

Revision history for this message
Baron Schwartz (baron-xaprb) wrote :

I will close this as NotABug, and add it to our blueprint for the next release.

Changed in percona-toolkit:
status: New → Invalid
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-915

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.