Bug #93599 Columns not named in group by clause should increase warnings in P_S tables
Submitted: 13 Dec 2018 20:21 Modified: 14 Dec 2018 14:05
Reporter: Oli Sennhauser Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: events_statements_history, GROUP BY, performance_schema

[13 Dec 2018 20:21] Oli Sennhauser
Description:
Non aggregated columns not named in GROUP BY clause are accepted in mysql unless only_full_group_by is set.

Finding those queries in application code is hard.

Thus it would be nice when those queries would rise a warning in P_S events_statements_history* tables so they could be found and eliminated before setting sql_mode = 'only_full_group_by'

How to repeat:
select a, b, count(*) from test group by a;
OK
select * from performance_schema.events_statements_history where warnings > 0;
-> query should be listed.

Suggested fix:
List those queries in P_S.events_statements_history* tables.
[14 Dec 2018 14:05] MySQL Verification Team
Hi,

Thank you for your contribution.

I find that this feature request is fully justified.

Verified as reported.