[MDEV-24360] MYISAM: Return wrong value with group by Created: 2020-12-07 Updated: 2023-11-28 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB, Storage Engine - MyISAM |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.3.23, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | nhokworm | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | MyISAM, innodb | ||
| Environment: |
Debian 8.0 (Jessie) |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
I have created the following table with MYISAM engine:
Please see the attached image for the result. But when I run this sql with the INNODB table, I get difference value of flag column. I think the sql with INNODB returned correct records. |
| Comments |
| Comment by Alice Sherepa [ 2020-12-08 ] | |||||||||||||||||
|
Thank you for the report!
| |||||||||||||||||
| Comment by Elena Stepanova [ 2020-12-08 ] | |||||||||||||||||
|
The queries above (both in the description and in the comment) can cause some controversy because they use unmatching SELECT and GROUP BY lists (not all non-aggregated fields from SELECT are present in GROUP BY). In this case it doesn't matter, here is an example based on Alice's test which shows a similar problem while using GROUP BY accurately:
It doesn't quite explain why nhokworm is getting "0" vs "1" in the result set, maybe it's specific to the UI in use. | |||||||||||||||||
| Comment by nhokworm [ 2020-12-08 ] | |||||||||||||||||
|
The above images is that I have taken from Mysql Workbench. Similarly, when I got results from Go, the value of flag also equals to 0. |