mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-27 16:12:04 +00:00
PT-142 pt-online-schema-change find_child_tables slow
This commit is contained in:
@@ -445,6 +445,31 @@ $output = output(
|
||||
# clear databases with their foreign keys
|
||||
$sb->load_file('master', "$sample/bug-1315130_cleanup.sql");
|
||||
|
||||
# #############################################################################
|
||||
# Issue 1315130
|
||||
# Failed to detect child tables in other schema, and falsely identified
|
||||
# child tables in own schema
|
||||
# #############################################################################
|
||||
|
||||
$sb->load_file('master', "$sample/bug-1315130_cleanup.sql");
|
||||
$sb->load_file('master', "$sample/bug-1315130.sql");
|
||||
|
||||
$output = output(
|
||||
sub { pt_online_schema_change::main(@args, "$master_dsn,D=bug_1315130_a,t=parent_table",
|
||||
'--dry-run',
|
||||
'--alter', "add column c varchar(16)",
|
||||
'--alter-foreign-keys-method', 'auto', '--only-same-schema-fks'),
|
||||
},
|
||||
);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/Child tables:\s*`bug_1315130_a`\.`child_table_in_same_schema` \(approx\. 1 rows\)[^`]*?Will/s,
|
||||
"Ignore child tables in other schemas.",
|
||||
);
|
||||
# clear databases with their foreign keys
|
||||
$sb->load_file('master', "$sample/bug-1315130_cleanup.sql");
|
||||
|
||||
|
||||
# #############################################################################
|
||||
# Issue 1340728
|
||||
|
Reference in New Issue
Block a user