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

Reported by Paul Graydon on 2012-01-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit
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

lp:~percona-toolkit-dev/percona-toolkit/fix-bug-911996
Merged into lp:percona-toolkit/2.0 at revision 130
Brian Fraser (community): Approve on 2012-01-05
Baron Schwartz (community): Approve on 2012-01-05
Daniel Nichter: Approve on 2012-01-05
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.

Baron Schwartz (baron-xaprb) wrote :

Can you post the output of this?

mysql> SHOW CREATE TABLE boc.doc\G

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

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
Daniel Nichter (daniel-nichter) wrote :

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

Baron Schwartz (baron-xaprb) wrote :

This is fixed now.

Changed in percona-toolkit:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers