pt-table-usage fails to parse double parenthesis when a column have a function definition

Bug #1415607 reported by Daniel Guzmán Burgos
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Triaged
Low
Frank Cizmich

Bug Description

While pt-table-usage is capable of parse correctly a column of the form: round(num), it get's trouble in presence of double parenthesis: round(sum(num))

Test case:
[percona@machine]$ cat a.txt
# Query_id: 16717677
select round(sum(num))
from db.tbl;

[percona@machine]$ ./pt-table-usage --id-attribute=Query_id a.txt
Error getting table usage: Column ident match failed at ./pt-table-usage line 3748, <> line 1.

[percona@machine]$ ./pt-table-usage --version
pt-table-usage 2.2.13

Verified also on previous version 2.2.5:
[percona@machine$ pt-table-usage --id-attribute=Query_id a.txt
Error getting table usage: Column ident match failed at /usr/bin/pt-table-usage line 3713, <> line 1.

Changed in percona-toolkit:
status: New → Confirmed
status: Confirmed → Triaged
assignee: nobody → Frank Cizmich (frank-cizmich)
importance: Undecided → Low
Revision history for this message
duff wang (duff-wang) wrote :

One workaround, so that we still get the table names from the query, is to comment out line 3575 and add the line `last`.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.