[MDEV-31959] GROUP BY with GROUP_CONCAT breaks BIT field in MyISAM Created: 2023-08-19 Updated: 2023-11-28 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.4, 10.5, 10.6, 10.9, 10.10, 10.11, 11.0, 10.11.5, 11.0.3 |
| Fix Version/s: | 10.4, 10.5, 10.6, 10.11, 11.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Thomas van Gulick | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian bookworm on amd64 |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
If you run these queries on the same data:
Looking only at the top two rows, makes it clear, MariaDB somehow does strange things to the ACCEPTED bit field, since the horizontal bar (pipe character |) is shifted in the first result, signifying one row has b'1', other row has b'0', while the second top 2 results show they both should be b'0', no shifted bar: GROUP_CONCAT query:
Second query without GROUP_CONCAT:
Can be solved by specifying 0+ACCEPTED in this case, but you have to continuously aware of the problem, and it changes the type of the field, which might not be desirable. Problem exists in both 10.11.5 and 11.0.3 which I tested. I've included a small test.sql with the two required tables and some test data to exactly replicate the above situation. I'm not entirely sure, but this problem does seem a bit similar to this very old MySQL bug: https://bugs.mysql.com/bug.php?id=30219 |
| Comments |
| Comment by Alice Sherepa [ 2023-09-19 ] | |||||||||||||||||||
|
Thank you very much! I repeated on 10.4-11.1 with Myisam and Aria, InnoDB returns correct result.
Note that for id=2 b=0X01 , while it is in fact should be 0x00 |