pt-query-digest outputs tonnes of warnings when combined
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
New
|
Undecided
|
Daniel Nichter |
Bug Description
When running pt-query-digest against our slow query logs I see thousands of warnings printed before the actual report is displayed. While the report itself seems correct, the warnings clutter up emails from cron etc.
The warnings look like:
$ pt-query-digest /var/lib/
Pipeline process 10 (aggregate fingerprint) caused an error: Argument "55A" isn't numeric in numeric gt (>) at (eval 34) line 6, <> line 3.
Pipeline process 10 (aggregate fingerprint) caused an error: Argument "55B" isn't numeric in numeric gt (>) at (eval 34) line 6, <> line 4.
Pipeline process 10 (aggregate fingerprint) caused an error: Argument "55C" isn't numeric in numeric gt (>) at (eval 34) line 6, <> line 5.
Pipeline process 10 (aggregate fingerprint) caused an error: Argument "55D" isn't numeric in numeric gt (>) at (eval 34) line 6, <> line 6.
Pipeline process 10 (aggregate fingerprint) caused an error: Argument "55E" isn't numeric in numeric gt (>) at (eval 34) line 6, <> line 7.
Pipeline process 10 (aggregate fingerprint) caused an error: Argument "55F" isn't numeric in numeric gt (>) at (eval 34) line 6, <> line 8.
When I use --no-report and --filter "print Dumper($event)" It outputs:
Pipeline process 11 (aggregate fingerprint) caused an error: Argument "1B53" isn't numeric in numeric gt (>) at (eval 41) line 233, <> line 4522.
$VAR1 = {
...
arg => 'SELECT MAX(important_
fingerprint => 'select max(important_
...
};
A example chunk of the slow query log is:
# User@Host: db[db] @ localhost []
# Thread_id: 40 Schema: db Last_errno: 0 Killed: 0
# Query_time: 0.000185 Lock_time: 0.000028 Rows_sent: 1 Rows_examined: 325 Rows_affected: 0 Rows_read: 1
# Bytes_sent: 93 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
# InnoDB_trx_id: 56D
SET timestamp=
SELECT MAX(important_
The versions of the server and toolkit are:
Package: percona-toolkit
Version: 2.0.2
Package: percona-
Version: 5.5.19-
Let me know if you require any more information.
Thanks for reporting this. I cannot reproduce the issue with the sample log entry, but that's not surprising because pt-query-digest writes subroutines at runtime based on a certain number of events, so sometimes one or even a handful of events aren't enough to reproduce a problem. Could you cut a log file down to the minimal size needed before this problem happens and upload that log? Or, you can email me a log privately from which I can create a sanitized test case?