pt-table-sync --replicate causes "Unknown column" error

Bug #911996 reported by Paul Graydon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Critical
Daniel Nichter

Bug Description

Version: pt-table-sync 2.0.1

Steps:
1) Run pt-table-checksum , discover differences exist between master and slave.
2) pt-table-sync --print --replicate percona.checksums master1 , to find out what it's going to do.
3) Pops up a bunch of errors of the form:
Unknown column 'R1992062264' in 'where clause' [for Statement "SELECT MIN(`docno`), MAX(`docno`) FROM `boc`.`doc` FORCE INDEX (`PRIMARY`) WHERE (((`docno` >= R1992062264)) AND ((`docno` <= R1992112899)))"] at line 3465 while doing boc.doc on slave1

4) ... ?
Nothing seems to end up being done

Master1 is running 5.1.58, Master2 is running 5.1.58, slave1 is running 5.1.59.

I presume it's because it's failing to quote the values it's doing a comparison against? I've confirmed adding ' marks around the values docno is being compared against makes it actually return data.

Related branches

Revision history for this message
Paul Graydon (twirrim) wrote :

If you need more detailed data I'm happy to provide some privately off ticket, I'm slightly restricted to what I can post in a public environment.

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

Can you post the output of this?

mysql> SHOW CREATE TABLE boc.doc\G

Revision history for this message
Paul Graydon (twirrim) wrote :
Download full text (3.2 KiB)

mysql> SHOW CREATE TABLE boc.doc\G
*************************** 1. row ***************************
       Table: doc
Create Table: CREATE TABLE `doc` (
  `docno` varchar(12) NOT NULL DEFAULT '',
  `doctype` char(1) DEFAULT NULL,
  `rdate` date NOT NULL DEFAULT '0000-00-00',
  `grantor` varchar(40) NOT NULL DEFAULT '',
  `grantee` varchar(40) NOT NULL DEFAULT '',
  `class` varchar(12) DEFAULT NULL,
  `class_desc` varchar(12) DEFAULT NULL,
  `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`docno`),
  KEY `names` (`grantor`,`grantee`),
  KEY `grantee` (`grantee`),
  KEY `idx_doc_rdate` (`rdate`),
  KEY `idx_doc_class` (`class`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ...

Read more...

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

That looks like a truly astonishing bug. *facepalm*

We're going to fix this in an upcoming release.

Changed in percona-toolkit:
importance: Undecided → Critical
assignee: nobody → Daniel Nichter (daniel-nichter)
status: New → In Progress
summary: - pt-table-sync replicate resulting in "Unknown Column"
+ pt-table-sync --replicate causes "Unknown column" error
Changed in percona-toolkit:
milestone: none → 2.0.2
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

We've fixed and will release this ASAP as Percona Toolkit 2.0.2.

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

This is fixed now.

Changed in percona-toolkit:
status: In Progress → 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-256

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.