Fix NULL vs. NULL comparison.

This commit is contained in:
Daniel Nichter
2013-06-26 12:26:34 -07:00
parent cefc0d3065
commit 362d80f7e8
2 changed files with 6 additions and 24 deletions

View File

@@ -10255,6 +10255,10 @@ sub identical_rows {
my $n_vals = $size_array1 - 1; # arrays are zero-indexed
for my $i ( 0..$n_vals ) {
# NULL == NULL
# https://bugs.launchpad.net/percona-toolkit/+bug/1168434
next if !defined $array1->[$i] && !defined $array2->[$i];
if ( defined $array1->[$i] && defined $array2->[$i] ) {
return 0 unless $array1->[$i] eq $array2->[$i];
}

View File

@@ -1,33 +1,11 @@
$rows = [
[
'1',
'a',
'2013-01-01 00:00:01'
'a'
],
[
'2',
'b',
'2013-01-01 00:00:02'
],
[
'3',
'c',
'2013-01-01 00:00:03'
],
[
'4',
'd',
'2013-01-01 00:00:04'
],
[
'5',
'e',
'2013-01-01 00:00:05'
],
[
'6',
'f',
'2013-01-01 00:00:06'
undef
]
];