Added changes suggested by mbenshoof, michaeldg

- Fixed issue with dry run and preserve triggers
- Fixed issue with trim multiline
- Changed DSNParser in lib
This commit is contained in:
Manjot Singh
2016-06-28 12:33:44 -07:00
parent 5642cc4fd0
commit a564cc7bc8
2 changed files with 5 additions and 2 deletions

View File

@@ -9554,7 +9554,9 @@ sub main {
if ($orig_trigger ne '') {
PTDEBUG && _d($orig_trigger);
print $orig_trigger, "\n" if $o->get('print');
$cxn->dbh()->do($orig_trigger);
if ( $o->get('execute') ) {
$cxn->dbh()->do($orig_trigger);
}
}
}
}
@@ -11108,7 +11110,7 @@ sub terminate_sql {
sub trim {
my ( $text ) = @_;
die "I need a text argument" unless defined $text;
$text =~ s/^\s+|\s+$//gm;
$text =~ s/^\s+|\s+$//g;
return $text;
}

View File

@@ -276,6 +276,7 @@ sub get_dbh {
PrintError => 0,
ShowErrorStatement => 1,
mysql_enable_utf8 => ($cxn_string =~ m/charset=utf8/i ? 1 : 0),
mysql_multi_statements => 1,
};
@{$defaults}{ keys %$opts } = values %$opts;
if (delete $defaults->{L}) { # L for LOAD DATA LOCAL INFILE, our own extension