~percona-toolkit-dev/percona-toolkit/fix-password-comma-bug-886077

« back to all changes in this revision

Viewing changes to bin/pt-kill

  • Committer: Daniel Nichter
  • Date: 2012-05-24 17:25:20 UTC
  • Revision ID: daniel@percona.com-20120524172520-d8ra1wqf49oavle2
Update DSNParser in all tools.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1136
1136
$Data::Dumper::Indent    = 0;
1137
1137
$Data::Dumper::Quotekeys = 0;
1138
1138
 
 
1139
my $dsn_sep = qr/(?<!\\),/;
 
1140
 
1139
1141
eval {
1140
1142
   require DBI;
1141
1143
};
1190
1192
   my %final_props;
1191
1193
   my $opts = $self->{opts};
1192
1194
 
1193
 
   foreach my $dsn_part ( split(/,/, $dsn) ) {
 
1195
   foreach my $dsn_part ( split($dsn_sep, $dsn) ) {
 
1196
      $dsn_part =~ s/\\,/,/g;
1194
1197
      if ( my ($prop_key, $prop_val) = $dsn_part =~  m/^(.)=(.*)$/ ) {
1195
1198
         $given_props{$prop_key} = $prop_val;
1196
1199
      }