pt-table-checksum fails when using murmur_hash

Bug #1680467 reported by Stefanos Boglou
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

I have installed the hash (fnv,fnv1a,murmur) functions from percona-server package to MariaDB 10.0 and 10.1. They are loaded fine and seems to work as expected.

When I run pt-table-checksum (2.20 from debian and 3.0.2 from your site) however MariaDB throws a warning which pt-table-checksum does not ignore and skips the table.

pt-table-checksum --replicate sys.checksums \
  --defaults-file /etc/mysql/debian.cnf \
  --databases marvin_production \
  --function MURMUR_HASH \
  --recursion-method none \
  h=localhost,u=debian-sys-maint

04-06T15:36:02 Error checksumming table marvin_production.addresses: Error executing checksum query: Checksum query for table marvin_production.addresses caused MySQL error 1105:
    Level: Note
     Code: 1105
  Message: Cast to unsigned converted negative integer to it's positive complement
    Query: REPLACE INTO ....

From my research it seems that CAST raises a warning when casting a negative integer to unsigned integer which pt-table-checksum detects it and skips the table.

MariaDB [(none)]> select CAST(MURMUR_HASH('adas') AS UNSIGNED);
+---------------------------------------+
| CAST(MURMUR_HASH('adas') AS UNSIGNED) |
+---------------------------------------+
| 11187289168470621758 |
+---------------------------------------+
1 row in set, 1 warning (0.00 sec)

MariaDB [(none)]> show warnings;
+-------+------+-------------------------------------------------------------------------+
| Level | Code | Message |
+-------+------+-------------------------------------------------------------------------+
| Note | 1105 | Cast to unsigned converted negative integer to it's positive complement |
+-------+------+-------------------------------------------------------------------------+
1 row in set (0.00 sec)

MariaDB [(none)]>

By adding 1105 => 1 to my %ignore_code it seems to work as expected.

Is this a bug or am I missing a configuration parameter for pt-table-checksum?
I suspect this affects pt-table-sync as well. Need to verify it tho.

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-1420

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.