Special pt-query-digest fingerprints no longer work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
In the fingerprint() subroutine, we have:
$query =~ m#/\*\w+
&& 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.
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.