pt-query-digest and pt-fingerprint don't strip some multi-line comments
Bug #1174956 reported by
roberto spadim
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Low
|
Daniel Nichter |
Bug Description
[beto@friganso ~]# pt-fingerprint --query "/* -- S++ SU ABORTABLE -- spd_user: rspadim */SELECT SQL_SMALL_RESULT SQL_CACHE DISTINCT centro_atividade FROM est_dia WHERE unidade_id=1001 AND item_id=67 AND item_id_red=573"
/*
[beto@friganso ~]# pt-fingerprint --version
pt-fingerprint 2.2.2
what should result?
[beto@friganso ~]# pt-fingerprint --query "/* -- S++ SU ABORTABLE -- spd_user: rspadim */SELECT SQL_SMALL_RESULT SQL_CACHE DISTINCT centro_atividade FROM est_dia WHERE unidade_id=1001 AND item_id=67 AND item_id_red=573"
SELECT DISTINCT centro_atividade FROM est_dia WHERE unidade_id=? AND item_id=? AND item_id_red=?
Related branches
lp:~percona-toolkit-dev/percona-toolkit/fix-fingerprint-bug-1174956
- Daniel Nichter: Approve
-
Diff: 216 lines (+32/-23)8 files modifiedbin/pt-fingerprint (+3/-3)
bin/pt-index-usage (+3/-3)
bin/pt-kill (+3/-3)
bin/pt-query-digest (+3/-3)
bin/pt-table-usage (+3/-3)
bin/pt-upgrade (+3/-3)
lib/QueryRewriter.pm (+3/-3)
t/lib/QueryRewriter.t (+11/-2)
tags: | added: fingerprints pt-fingerprint |
Changed in percona-toolkit: | |
status: | New → Confirmed |
Changed in percona-toolkit: | |
status: | Confirmed → In Progress |
assignee: | nobody → Brian Fraser (fraserbn) |
Changed in percona-toolkit: | |
milestone: | none → 2.2.3 |
Changed in percona-toolkit: | |
assignee: | Brian Fraser (fraserbn) → nobody |
Changed in percona-toolkit: | |
status: | In Progress → Triaged |
Changed in percona-toolkit: | |
importance: | Undecided → Low |
Changed in percona-toolkit: | |
status: | Triaged → In Progress |
assignee: | nobody → Daniel Nichter (daniel-nichter) |
summary: |
- pt-fingerprint with wrong commentary remove + pt-query-digest and pt-fingerprint don't strip some multi-line comments |
tags: | added: pt-index-usage pt-query-advisor pt-upgrade |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
the problem is the "--" of commentary
check:
WRONG!
[beto@friganso ~]# pt-fingerprint --query "/* -- S SU ABORTABLE -- spd_user: rspadim */SELECT SQL_SMALL_RESULT SQL_CACHE DISTINCT centro_atividade FROM est_dia WHERE unidade_id=1001 AND item_id=67 AND item_id_red=573"
/*
RIGHT!
[beto@friganso ~]# pt-fingerprint --query "/* S SU ABORTABLE spd_user: rspadim */SELECT SQL_SMALL_RESULT SQL_CACHE DISTINCT centro_atividade FROM est_dia WHERE unidade_id=1001 AND item_id=67 AND item_id_red=573"
select sql_small_result sql_cache distinct centro_atividade from est_dia where unidade_id=? and item_id=? and item_id_red=?