diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index df09042a..d1b0fab7 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -4140,7 +4140,7 @@ sub main { } } - my $rename_fk_method = lc $o->get('update-foreign-keys-method'); + my $rename_fk_method = lc($o->get('update-foreign-keys-method') || ''); if ( ($rename_fk_method || '') eq 'drop_old_table' ) { $o->set('rename-tables', 0); $o->set('drop-old-table', 0), @@ -4325,7 +4325,7 @@ sub main { if ( lc $child_tables eq 'auto_detect' ) { msg("Auto-detecting child tables of $tbl"); @child_tables = get_child_tables(%plugin_args); - msg("Child tables of $tables{old_table}: " + msg("Child tables of $tables{old_tbl}: " . (@child_tables ? join(', ', @child_tables) : "(none)")); } else { diff --git a/t/pt-online-schema-change/check_tables.t b/t/pt-online-schema-change/check_tables.t index 7ecb3182..f2d6b435 100644 --- a/t/pt-online-schema-change/check_tables.t +++ b/t/pt-online-schema-change/check_tables.t @@ -30,7 +30,7 @@ my $vp = new VersionParser(); my $q = new Quoter(); my $tp = new TableParser(Quoter => $q); my $du = new MySQLDump(); -my $chunker = new TableChunker(Quoter => $q, MySQLDump => $du); +my $chunker = new TableChunker(Quoter => $q, TableParser => $tp); my $o = new OptionParser(); $o->get_specs("$trunk/bin/pt-online-schema-change");