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

Reported by Baron Schwartz on 2012-02-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit
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."

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
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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers