mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-20 02:20:04 +08:00
PT-126 Fix remove comments regex
This commit is contained in:
@@ -10053,8 +10053,12 @@ sub find_renamed_cols {
|
|||||||
/x;
|
/x;
|
||||||
|
|
||||||
my $table_ident = qr/$unquoted_ident|`$quoted_ident`|"$ansi_quotes_ident"/;
|
my $table_ident = qr/$unquoted_ident|`$quoted_ident`|"$ansi_quotes_ident"/;
|
||||||
my $alter_change_col_re = qr/\bCHANGE \s+ (?:COLUMN \s+)? (?:COMMENT\s+[^\]['].*?[^\]['])?
|
|
||||||
(?:COMMENT\s+[^\]["].*?[^\]["])?
|
# 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;
|
($table_ident) \s+ ($table_ident)/ix;
|
||||||
|
|
||||||
my %renames;
|
my %renames;
|
||||||
|
|||||||
Reference in New Issue
Block a user