pt-table-sync --ignore-columns case sensitivity

Bug #1311584 reported by Kenny Gryp on 2014-04-23
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit
Undecided
Unassigned

Bug Description

using pt-table-sync with an upper case character in --ignore-columns will make the column not to be ignored.

CREATE TABLE test (
 id primary key,
 IGNOREME char(32)
);

You can only ignore this column with --ignore-columns=ignoreme,
--ignore-columns=IGNOREME does not work.

~line 10528:
      # Determine which columns to compare.
      my $ignore_columns = $o->get('ignore-columns');
      my @compare_columns = grep {
         !$ignore_columns->{lc $_};
      } @{$o->get('columns') || $tbl_struct->{cols}};

The table columns are converted to lower case, but the columns provided with --ignore-columns are not.

Verified with pt-table-sync 2.2.9,

nilnandan@nilnandan-Dell-XPS:~$ pt-table-sync --version
pt-table-sync 2.2.9
nilnandan@nilnandan-Dell-XPS:~$

~line 10510:

# Determine which columns to compare.
      my $ignore_columns = $o->get('ignore-columns');
      my @compare_columns = grep {
         !$ignore_columns->{lc $_};
      } @{$o->get('columns') || $tbl_struct->{cols}};

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

Other bug subscribers