pt-query-digest reports 'No events processed.' with --since option for mysql 5.7

Bug #1581752 reported by Nickolay Ihalainen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Undecided
Carlos Salguero

Bug Description

Time field in slow log in 5.7 has new format:

"Time: 2016-05-14T05:28:50.060335Z"

Quick fix for pt-query-digest tool:
#!/bin/bash

wget http://percona.com/get/pt-query-digest
patch <<- 'pt-query-digest.5.7-slow-time.patch'
--- pt-query-digest.orig 2016-05-14 07:00:03.967961246 +0000
+++ pt-query-digest 2016-05-14 07:00:17.075913159 +0000
@@ -4971,7 +4971,7 @@ sub new {
    return bless $self, $class;
 }

-my $slow_log_ts_line = qr/^# Time: ([0-9: ]{15})/;
+my $slow_log_ts_line = qr/^# Time: ((?:[0-9: ]{15})|(?:[-0-9: T]{19}))/;
 my $slow_log_uh_line = qr/# User\@Host: ([^\[]+|\[[^[]+\]).*?@ (\S*) \[(.*)\]\s*(?:Id:\s*(\d+))?/;
 my $slow_log_hd_line = qr{
       ^(?:
pt-query-digest.5.7-slow-time.patch
chmod +x ./pt-query-digest
./pt-query-digest --since=2016-05-09 /var/lib/mysql/slow.log

Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Nickolay Ihalainen (ihanick) wrote :
Changed in percona-toolkit:
status: Confirmed → Fix Committed
milestone: none → 2.2.19
assignee: nobody → Carlos Salguero (carlos-salguero)
Changed in percona-toolkit:
status: Fix Committed → Fix Released
Revision history for this message
monty solomon (monty+launchpad) wrote :

Does the fix for this bug fix bug 1594629?

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1347

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.