~percona-toolkit-dev/percona-toolkit/fix-dl-ts-bug-1195034

« back to all changes in this revision

Viewing changes to bin/pt-query-digest

Merged fix-1156901-skip-retry-check-for-repl-threads

Show diffs side-by-side

added added

removed removed

Lines of Context:
3215
3215
               $new_query = 1;
3216
3216
            }
3217
3217
            elsif ( $curr->[INFO] && defined $curr->[TIME]
3218
 
                    && $query_start - $etime - $prev->[START] > $fudge ) {
3219
 
               PTDEBUG && _d('Query restarted; new query',
3220
 
                  $query_start, $etime, $prev->[START], $fudge);
3221
 
               $new_query = 1;
 
3218
                    && $query_start - $etime - $prev->[START] > $fudge)
 
3219
            {
 
3220
               my $ms = $self->{MasterSlave};
 
3221
               
 
3222
               my $is_repl_thread = $ms->is_replication_thread({
 
3223
                                        Command => $curr->[COMMAND],
 
3224
                                        User    => $curr->[USER],
 
3225
                                        State   => $curr->[STATE],
 
3226
                                        Id      => $curr->[ID]});
 
3227
               if ( $is_repl_thread ) {
 
3228
                  PTDEBUG &&
 
3229
                  _d(q{Query has restarted but it's a replication thread, ignoring});
 
3230
               }
 
3231
               else {
 
3232
                  PTDEBUG && _d('Query restarted; new query',
 
3233
                     $query_start, $etime, $prev->[START], $fudge);
 
3234
                  $new_query = 1;
 
3235
               }
3222
3236
            }
3223
3237
 
3224
3238
            if ( $new_query ) {