pt-query-digest fails to parse timestamp with no query

Bug #1082599 reported by Ovais Tariq on 2012-11-24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to
Fix Released
Daniel Nichter

Bug Description

Brian I am reporting this as a bug in relation to what we talked about the problem I was facing with getting pt-query-digest to parse the slow log.

# pt-query-digest --version
pt-query-digest 2.1.5

The tool pt-query-digest fails to parse the slow log for queries if the queries are prefixed by SET timestamp=xxx. Removing the "SET timestamp=xxx" statements from the slow log fixes the issue and pt-query-digest then works as expected.

Related branches

Ovais Tariq (ovais-tariq) wrote :

I would like to add that this bug affects those who use this feature of Percona Server:

Brian Fraser (fraserbn) on 2012-11-24
tags: added: percona-server
Changed in percona-toolkit:
status: New → Triaged
milestone: none → 2.1.8
Changed in percona-toolkit:
importance: Undecided → High
Changed in percona-toolkit:
assignee: nobody → Daniel Nichter (daniel-nichter)
Daniel Nichter (daniel-nichter) wrote :

This should work already: knows about SET statements. Maybe the format of those statements has changed. If you could provide a sample log that causes the problem, Ovais, that would be great. Else I'll try to reproduce it.

Ovais Tariq (ovais-tariq) wrote :


I have attached the log file that pt-query-digest is failing to parse. Note that removing "set timestamp = xxx" from the log fixes the issue.

For example use the attached slow.log file as follows and pt-query-digest will not parse it correctly:
cat slow.log | pt-query-digest

However, remove the SET TIMESTAMP = xx line and everything works fine:
cat slow.log | sed '/SET timestamp/d' | pt-query-digest

Changed in percona-toolkit:
status: Triaged → In Progress
summary: - pt-query-digest fails to parse queries preceded with SET timestamp=x
+ pt-query-digest fails to parse timestamp with no query
Changed in percona-toolkit:
status: In Progress → Fix Committed
Changed in percona-toolkit:
status: Fix Committed → Fix Released

Percona now uses JIRA for bug reports so this bug report is migrated to:

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

Other bug subscribers

Bug attachments