mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-03-28 03:00:25 +08:00
Merge pull request #219 from percona/PT-126-a
PT-126 Recognize comments having quotes
This commit is contained in:
@@ -10053,7 +10053,8 @@ 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+[^\]['"].*?[^\]['"])?
|
||||
my $alter_change_col_re = qr/\bCHANGE \s+ (?:COLUMN \s+)? (?:COMMENT\s+[^\]['].*?[^\]['])?
|
||||
(?:COMMENT\s+[^\]["].*?[^\]["])?
|
||||
($table_ident) \s+ ($table_ident)/ix;
|
||||
|
||||
my %renames;
|
||||
|
||||
@@ -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",
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user