Special pt-query-digest fingerprints no longer work

Bug #897685 reported by Baron Schwartz on 2011-11-29
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Won't Fix

Bug Description

In the fingerprint() subroutine, we have:

   $query =~ m#/\*\w+\.\w+:[0-9]/[0-9]\*/# # pt-table-checksum, etc query
      && return 'percona-toolkit';

But in other tools, I doubt we have tests to ensure that they don't get changed in a way that will break these expectations. We should test the other tools to prevent this problem. In addition, I worry that this pattern is generic -- it is the type of thing that any application could put into a query comment. We should make our tools put a specific comment into their queries, like /* pt-table-checksum .......... */ and the pattern should pull out the tool's name and return that as the fingerprint.

Also, in pt-query-digest, we are not exposing to the user the fact that a given class of queries is a special case. We might want to address this in a separate bug report though.

Daniel Nichter (daniel-nichter) wrote :

pt-table-checksum 1.0 did not use prepared statements, so it could have alterable comments like /* chunk 1/5 */, but pt-table-checksum 2.0 uses prepared statements so those kinds of comments no longer work. Consequently, pt-query-digest won't be able to fingerprint pt-table-checksum 2.0 specially.

summary: - pt-query-digest expects query formatting from other tools
+ Special pt-query-digest fingerprints no longer work
Changed in percona-toolkit:
status: New → Confirmed
tags: added: fingerprints
removed: pt-table-checksum
Daniel Nichter (daniel-nichter) wrote :

WontFix because this is a type of gold plating: I don't see much need for pqd to specially identify queries from other tools. Plus, as those queries in other tools change, maintaining this will be a burden and I don't see the benefit it provides.

Changed in percona-toolkit:
status: Confirmed → Won't Fix

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

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

Other bug subscribers