From b4568ee2553edc1acd16f50bcbc3ffe2219028fa Mon Sep 17 00:00:00 2001 From: Manjot Singh Date: Fri, 27 May 2016 08:55:37 -0700 Subject: [PATCH] Fixed small issue with old trigger run when no old triggers line 9554 --- bin/pt-online-schema-change | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index d4ce86c3..58f6a77f 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -9551,9 +9551,11 @@ sub main { print "Adding original triggers to new table.\n"; foreach my $orig_trigger (@orig_triggers) { - PTDEBUG && _d($orig_trigger); - print $orig_trigger, "\n" if $o->get('print'); - $cxn->dbh()->do($orig_trigger); + if ($orig_trigger ne '') { + PTDEBUG && _d($orig_trigger); + print $orig_trigger, "\n" if $o->get('print'); + $cxn->dbh()->do($orig_trigger); + } } }