[MDEV-6685] Apparent incorrect validation of GROUP BY fields when ONLY_FULL_GROUP_BY sql_mode enabled Created: 2014-09-03  Updated: 2022-09-08

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.12
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Marc Burgess Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Windows 7 Enterprise, using HeidiSQL


Attachments: File database.sql     File query.sql    

 Description   

After executing set session sql_mode = 'ONLY_FULL_GROUP_BY', running the attached query (query.sql) in the database created by attached database.sql gives "SQL Error (1463): Non-grouping field 'BENEFIT_INDICATOR' is used in HAVING clause", even though the verbatim BENEFIT_INDICATOR field is included in the GROUP BY.

Related, but not so much a bug, I had to include additional fields in the GROUP BY compared to other DBMS to get it to run without the HAVING clause - the validation appears to have issues field names included in the CONCATs in the GROUP BY.


Generated at Thu Feb 08 07:13:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.