pt-query-advisor RES.001 is incorrect
Bug #996069 reported by
Rob Smith
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Low
|
Brian Fraser |
Bug Description
The following query incorrectly triggers RES.001
SELECT cola, MAX(colb) FROM table WHERE cola = 123 GROUP BY cola;
All the aggregate functions I've tested seem to result in the same incorrect RES.001 trigger.
Related branches
lp:~percona-toolkit-dev/percona-toolkit/fix-937234-pqa-wrong-res.001
- Daniel Nichter: Approve
-
Diff: 124 lines (+57/-5)3 files modifiedbin/pt-query-advisor (+14/-2)
lib/QueryAdvisorRules.pm (+16/-2)
t/lib/QueryAdvisorRules.t (+27/-1)
tags: | added: query-rule |
Changed in percona-toolkit: | |
status: | New → Triaged |
Changed in percona-toolkit: | |
milestone: | none → 2.1.7 |
Changed in percona-toolkit: | |
milestone: | 2.1.7 → 2.1.8 |
Changed in percona-toolkit: | |
importance: | Undecided → Low |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
summary: |
- Incorrect RES.001 + pt-query-advisor RES.001 is incorrect |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Actually that test case shows a different thing we ought to be catching: if you GROUP BY something that's constrained to be a constant, you should really not GROUP BY it. We might want to create a new rule for that.