diff --git a/bin/pt-archiver b/bin/pt-archiver index 4356114a..9484eb45 100755 --- a/bin/pt-archiver +++ b/bin/pt-archiver @@ -45,7 +45,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-config-diff b/bin/pt-config-diff index 18f3837c..a24d7e55 100755 --- a/bin/pt-config-diff +++ b/bin/pt-config-diff @@ -43,7 +43,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-deadlock-logger b/bin/pt-deadlock-logger index 3420a70e..94a54603 100755 --- a/bin/pt-deadlock-logger +++ b/bin/pt-deadlock-logger @@ -42,7 +42,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-diskstats b/bin/pt-diskstats index 74518844..3e0e2e76 100755 --- a/bin/pt-diskstats +++ b/bin/pt-diskstats @@ -38,7 +38,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-duplicate-key-checker b/bin/pt-duplicate-key-checker index abf05d5b..8b592eb1 100755 --- a/bin/pt-duplicate-key-checker +++ b/bin/pt-duplicate-key-checker @@ -39,7 +39,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-find b/bin/pt-find index e84b3516..4f300a53 100755 --- a/bin/pt-find +++ b/bin/pt-find @@ -35,7 +35,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-fk-error-logger b/bin/pt-fk-error-logger index a9c68bcb..e94fd70b 100755 --- a/bin/pt-fk-error-logger +++ b/bin/pt-fk-error-logger @@ -37,7 +37,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-heartbeat b/bin/pt-heartbeat index 4f1c06dc..19f7656c 100755 --- a/bin/pt-heartbeat +++ b/bin/pt-heartbeat @@ -44,7 +44,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-index-usage b/bin/pt-index-usage index 52be0734..b01ceff5 100755 --- a/bin/pt-index-usage +++ b/bin/pt-index-usage @@ -45,7 +45,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-kill b/bin/pt-kill index 6631affa..2d7612f9 100755 --- a/bin/pt-kill +++ b/bin/pt-kill @@ -47,7 +47,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index fb92c18f..9302aa3f 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -55,7 +55,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; @@ -10073,8 +10073,13 @@ sub find_renamed_cols { /x; my $table_ident = qr/$unquoted_ident|`$quoted_ident`|"$ansi_quotes_ident"/; - my $alter_change_col_re = qr/\bCHANGE \s+ (?:COLUMN \s+)? (?:COMMENT\s+[^\]['"].*?[^\]['"])? - ($table_ident) \s+ ($table_ident)/ix; + + # remove comments + $alter =~ s/^(.*?)\s+COMMENT\s+'(.*?[^\\]')+(.*)/$1$3/; + $alter =~ s/^(.*?)\s+COMMENT\s+"(.*?[^\\]")+(.*)/$1$3/; + + my $alter_change_col_re = qr/\bCHANGE \s+ (?:COLUMN \s+)? + ($table_ident) \s+ ($table_ident)/ix; my %renames; while ( $alter =~ /$alter_change_col_re/g ) { diff --git a/bin/pt-query-digest b/bin/pt-query-digest index 6eba03da..e34f5cd3 100755 --- a/bin/pt-query-digest +++ b/bin/pt-query-digest @@ -64,7 +64,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-slave-delay b/bin/pt-slave-delay index f1464cfc..56032d14 100755 --- a/bin/pt-slave-delay +++ b/bin/pt-slave-delay @@ -40,7 +40,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-slave-restart b/bin/pt-slave-restart index 30941fa4..0657292f 100755 --- a/bin/pt-slave-restart +++ b/bin/pt-slave-restart @@ -41,7 +41,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-table-checksum b/bin/pt-table-checksum index 3f3ab88a..af4671cb 100755 --- a/bin/pt-table-checksum +++ b/bin/pt-table-checksum @@ -57,7 +57,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-table-sync b/bin/pt-table-sync index 64275d92..0d24f467 100755 --- a/bin/pt-table-sync +++ b/bin/pt-table-sync @@ -55,7 +55,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-upgrade b/bin/pt-upgrade index 1c6045e0..7abcb191 100755 --- a/bin/pt-upgrade +++ b/bin/pt-upgrade @@ -61,7 +61,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/bin/pt-variable-advisor b/bin/pt-variable-advisor index 6247ee69..ae0ffc9a 100755 --- a/bin/pt-variable-advisor +++ b/bin/pt-variable-advisor @@ -44,7 +44,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/lib/Percona/Toolkit.pm b/lib/Percona/Toolkit.pm index bf3a76dc..ff8109bb 100644 --- a/lib/Percona/Toolkit.pm +++ b/lib/Percona/Toolkit.pm @@ -18,7 +18,7 @@ # ########################################################################### package Percona::Toolkit; -our $VERSION = '3.0.2'; +our $VERSION = '3.0.3'; use strict; use warnings FATAL => 'all'; diff --git a/t/pt-online-schema-change/bugs.t b/t/pt-online-schema-change/bugs.t index 61025eaa..ae3db4cb 100644 --- a/t/pt-online-schema-change/bugs.t +++ b/t/pt-online-schema-change/bugs.t @@ -610,7 +610,7 @@ $sb->load_file('master', "$sample/bug-1613915.sql"); $output = output( sub { pt_online_schema_change::main(@args, "$master_dsn,D=test,t=o1", '--execute', - '--alter', "ADD COLUMN c INT COMMENT 'change plus more than one word'", + '--alter', "ADD COLUMN c INT COMMENT 'change \"plus\" more than one word'", '--chunk-size', '10', '--no-check-alter', ), }, @@ -633,7 +633,7 @@ is( $rows = $master_dbh->selectrow_arrayref("SHOW CREATE TABLE test.o1"); like( $rows->[1], - qr/COMMENT 'change plus more than one word'/, + qr/COMMENT 'change "plus" more than one word'/, "recognize comments", );