pt-query-advisor treats distinct() as a function

Bug #933469 reported by Baron Schwartz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Won't Fix
Undecided
Unassigned

Bug Description

select distinct (continent), name from world.Country;

Shlomi's description is best: "there is nothing wrong syntactically, but the author of the query might be confused to think that DISTINCT is a function, and that it only works for the 'continent' column, whereas it works for the entire set of columns."

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

To clarify the problem:

$ ./pt-query-advisor --query "select distinct (continent), name from world.Country"

No output because the tool doesn't see the problem as Shlomi describes. So, we need to add a rule/check for this.

Changed in percona-toolkit:
status: New → Confirmed
tags: added: query-rule
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

pt-query-advisor was removed in 2.2. Use pt-query-advisor 2.1 or the online tool: https://tools.percona.com/query-advisor.

This issue has been moved to https://github.com/percona/query-advisor/issues/9.

Changed in percona-toolkit:
status: Confirmed → Won't Fix
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-933

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.