pt-table-checksum reports diffs on timestamp columns in 5.5 vs 5.6

Bug #1321297 reported by Joe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Medium
Frank Cizmich

Bug Description

When running pt-table-checksum on tables with timestamp columns and replicating from 5.5 to 5.6, differences are reported when the column data actually matches.

It looks like this is because of this line...
http://bazaar.launchpad.net/~percona-toolkit-dev/percona-toolkit/2.2/view/598/bin/pt-table-checksum#L5781

If I change that to ...
$result .= '';
No differences are reported.

Related branches

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Hi, I have tried to reproduce it with Master(5.5) and Slave (5.6) but unable to found any differences for timestamp column.
Can you please provide exact steps to reproduce it?

Master:

mysql> show create table test \G
*************************** 1. row ***************************
       Table: test
Create Table: CREATE TABLE `test` (
  `id` int(11) DEFAULT NULL,
  `name` varchar(10) DEFAULT NULL,
  `bdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

mysql> select version();
+-------------------------+
| version() |
+-------------------------+
| 5.5.36-34.2-rel34.2-log |
+-------------------------+
1 row in set (0.00 sec)

mysql>

Slave:

mysql> select version();
+----------------+
| version() |
+----------------+
| 5.6.15-rel63.0 |
+----------------+
1 row in set (0.00 sec)

mysql>

nilnandan@nilnandan-Dell-XPS:~$ pt-table-checksum --socket=/tmp/mysql_sandbox5536.sock --recursion-method=DSN=h=localhost,D=percona,t=dsns --databases=nil
            TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE
08-05T16:03:18 0 0 2904 4 0 0.160 nil.test
nilnandan@nilnandan-Dell-XPS:~$

Changed in percona-toolkit:
status: New → Incomplete
Revision history for this message
Joe (joegrasse) wrote :

Looks like it might be specific to the datetime column type. Use this create table statement instead.

CREATE TABLE `test` (
  `id` int(11) DEFAULT NULL,
  `name` varchar(10) DEFAULT NULL,
  `bdate` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1

Revision history for this message
Joe (joegrasse) wrote :

Ignore the last comment. It had been a little while since I encountered this issue and I forgot what caused it. I think it is a bit more complicated than just a column of type timestamp. I will look into how to reproduce it.

Revision history for this message
Joe (joegrasse) wrote :

Ok, I think I see why you didn't see the issue and I did. What function are you using to hash with? I am using FNV_64. I ran some tests and I don't see the issue if i use the CRC32 has function.

Revision history for this message
Joe (joegrasse) wrote :

Do you need anything else from me?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Percona Toolkit because there has been no activity for 60 days.]

Changed in percona-toolkit:
status: Incomplete → Expired
Joe (joegrasse)
Changed in percona-toolkit:
status: Expired → New
Revision history for this message
Frank Cizmich (frank-cizmich) wrote :

Hi Joe,

Just noticed you "bumped" this issue.
There's a chance this will get fixed along with: https://bugs.launchpad.net/percona-toolkit/+bug/1388870

I'm attaching a patch for pt-tabl-checksum from that fix.
Please try it out if you have a chance.

Regards

Revision history for this message
Joe (joegrasse) wrote :

That will probably work.

I just noticed that the link in the original bug description was referencing the 'head' revision. I have updated the link to the correct revision so it once again points to the correct line.

description: updated
Changed in percona-toolkit:
milestone: none → 2.2.13
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Frank Cizmich (frank-cizmich)
Changed in percona-toolkit:
status: In Progress → Fix Committed
Changed in percona-toolkit:
status: Fix Committed → Fix Released
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-649

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.