~percona-toolkit-dev/percona-toolkit/pt-fingerprint-broken-fingerprinting-of-specific-INSERT-REPLACE-queries-1289516

« back to all changes in this revision

Viewing changes to bin/pt-variable-advisor

Merge fix-pt-archiver-dry-run-bug-1199589 and make 2.2.4 release dates in Changelog and release_notes.pod match.

Show diffs side-by-side

added added

removed removed

Lines of Context:
510
510
   my $long = exists $self->{opts}->{$opt}       ? $opt
511
511
            : exists $self->{short_opts}->{$opt} ? $self->{short_opts}->{$opt}
512
512
            : die "Getopt::Long gave a nonexistent option: $opt";
513
 
 
514
513
   $opt = $self->{opts}->{$long};
515
514
   if ( $opt->{is_cumulative} ) {
516
515
      $opt->{value}++;
517
516
   }
 
517
   elsif ( ($opt->{type} || '') eq 's' && $val =~ m/^--?(.+)/ ) {
 
518
      my $next_opt = $1;
 
519
      if (    exists $self->{opts}->{$next_opt}
 
520
           || exists $self->{short_opts}->{$next_opt} ) {
 
521
         $self->save_error("--$long requires a string value");
 
522
         return;
 
523
      }
 
524
      else {
 
525
         $opt->{value} = $val;
 
526
      }
 
527
   }
518
528
   else {
519
529
      $opt->{value} = $val;
520
530
   }
6146
6156
 
6147
6157
=head1 VERSION
6148
6158
 
6149
 
pt-variable-advisor 2.2.3
 
6159
pt-variable-advisor 2.2.4
6150
6160
 
6151
6161
=cut