Comment 1 for bug 1462904

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote :

I can suggested some stupid straightforward patch:

[openxs@chief percona-toolkit-2.2]$ bzr diff
=== modified file 'bin/pt-duplicate-key-checker'
--- bin/pt-duplicate-key-checker 2015-01-23 10:19:56 +0000
+++ bin/pt-duplicate-key-checker 2015-06-08 08:54:54 +0000
@@ -356,7 +356,12 @@
    my (%type_for, %is_nullable, %is_numeric, %is_autoinc);
    foreach my $col ( @cols ) {
       my $def = $def_for{$col};
- my ( $type ) = $def =~ m/`[^`]+`\s([a-z]+)/;
+ my ( $type );
+ ($type) = $def =~ m/`[^`]+`\s([a-z]+)/;
+ unless ($type) {
+ ($type) = $def =~ m/```[^`]+```\s([a-z]+)/;
+ }
+# my ( $type ) = $def =~ m/`[^`]+`\s([a-z]+)/;
       die "Can't determine column type for $def" unless $type;
       $type_for{$col} = $type;
       if ( $type =~ m/(?:(?:tiny|big|medium|small)?int|float|double|decimal|year)/ ) {