pt-upgrade reports differences on NULL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
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-
#------
# Logs
#------
File: test1.txt
Size: 193
#------
# Hosts
#------
host1:
DSN: h=utest-
hostname: utest-1
MySQL: (Debian) 5.0.87
host2:
DSN: h=utest-
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
Related branches
- Daniel Nichter: Approve
-
Diff: 179 lines (+121/-0)9 files modifiedbin/pt-upgrade (+4/-0)
t/pt-upgrade/diff_rows.t (+14/-0)
t/pt-upgrade/samples/007/null.log (+4/-0)
t/pt-upgrade/samples/007/null.txt (+35/-0)
t/pt-upgrade/samples/007/null_results.txt (+32/-0)
t/pt-upgrade/samples/007/null_results/query (+3/-0)
t/pt-upgrade/samples/007/null_results/results (+6/-0)
t/pt-upgrade/samples/007/null_results/rows (+12/-0)
t/pt-upgrade/samples/007/tables.sql (+11/-0)
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 |
Seems to be a fairly simple fix, I think - attached patch works for me.