pt-upgrade reports differences on NULL

Reported by Sami Ahlroos on 2013-04-12
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit
Medium
Daniel Nichter

Bug Description

When testing upgrade from 5.0.87 to 5.5 we encountered something interesting using pt-upgrade 2.2.1.

Table:
CREATE TABLE `test1` (
  `fuu` varchar(10) default NULL,
  `id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8

As soon as 'fuu' contains NULL, pt-upgrade 2.2.1 reports tables being different. Any non-NULL value in `fuu`, or using version 2.1 results in "no differences".

PTDEBUG=1 output attached.

$ pt-upgrade h=utest-1.backup.fra1,D=crc h=utest-2.backup.fra1,D=crc test1.txt

#-----------------------------------------------------------------------
# Logs
#-----------------------------------------------------------------------

File: test1.txt
Size: 193

#-----------------------------------------------------------------------
# Hosts
#-----------------------------------------------------------------------

host1:

  DSN: h=utest-1.backup.fra1
  hostname: utest-1
  MySQL: (Debian) 5.0.87

host2:

  DSN: h=utest-2.backup.fra1
  hostname: utest-2
  MySQL: Percona Server (GPL), Release 30.2 5.5.30

########################################################################
# Query class 5E449981E650B75A
########################################################################

Reporting class because it has diffs, but hasn't been reported yet.

Total queries 1
Unique queries 1
Discarded queries 0

select `test?`.* from `test?` where `test?`.`id` = ? limit ?

##
## Row diffs: 1
##

-- 1.

@ row 1
< NULL,852800
> NULL,852800

SELECT `test1`.* FROM `test1` WHERE `test1`.`id` = 852800 LIMIT 1

#-----------------------------------------------------------------------
# Stats
#-----------------------------------------------------------------------

failed_queries 0
not_select 0
queries_filtered 0
queries_no_diffs 0
queries_read 1
queries_with_diffs 1
queries_with_errors 0

Sami Ahlroos (sami-ahlroos) wrote :
Ben Smithurst (bensmithurst) wrote :

Seems to be a fairly simple fix, I think - attached patch works for me.

tags: added: pt-upgrade wrong-output
Changed in percona-toolkit:
milestone: none → 2.2.3
status: New → Confirmed
Changed in percona-toolkit:
importance: Undecided → Medium
Changed in percona-toolkit:
status: Confirmed → In Progress
Changed in percona-toolkit:
assignee: nobody → Daniel Nichter (daniel-nichter)
Changed in percona-toolkit:
status: In Progress → Fix Committed
Changed in percona-toolkit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers