Merge pull request #90 from ihanick/2.2-lp1581752

fix lp:1581752 5.7 compatibility for pt-query-digest, slow log time format
@ihanick Thanks for your fix.
I've added a test case and also I've modified all other scripts using SlowLogParser.
You can check the new PR https://github.com/percona/percona-toolkit/pull/118
This commit is contained in:
Carlos Salguero
2016-07-20 16:02:39 -03:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -4993,7 +4993,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{
^(?:

View File

@@ -41,7 +41,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+))?/;
# These can appear in the log file when it's opened -- for example, when someone
# runs FLUSH LOGS or the server starts.