mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 05:58:16 +00:00
Update DSNParser in all tools.
This commit is contained in:
@@ -28,6 +28,8 @@ use Data::Dumper;
|
||||
$Data::Dumper::Indent = 0;
|
||||
$Data::Dumper::Quotekeys = 0;
|
||||
|
||||
my $dsn_sep = qr/(?<!\\),/;
|
||||
|
||||
eval {
|
||||
require DBI;
|
||||
};
|
||||
@@ -82,7 +84,8 @@ sub parse {
|
||||
my %final_props;
|
||||
my $opts = $self->{opts};
|
||||
|
||||
foreach my $dsn_part ( split(/,/, $dsn) ) {
|
||||
foreach my $dsn_part ( split($dsn_sep, $dsn) ) {
|
||||
$dsn_part =~ s/\\,/,/g;
|
||||
if ( my ($prop_key, $prop_val) = $dsn_part =~ m/^(.)=(.*)$/ ) {
|
||||
$given_props{$prop_key} = $prop_val;
|
||||
}
|
||||
|
Reference in New Issue
Block a user