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

Bug #933469 reported by Baron Schwartz on 2012-02-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to
Won't Fix

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:

This issue has been moved to

Changed in percona-toolkit:
status: Confirmed → Won't Fix

Percona now uses JIRA for bug reports so this bug report is migrated to:

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

Other bug subscribers