[MDEV-17419] Subquery with group by returns wrong results Created: 2018-10-10 Updated: 2018-10-17 Resolved: 2018-10-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.3.9 |
| Fix Version/s: | 10.3.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Stijn | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Tested on Windows (laptop) and CentOS (server). I don't think this bug has anything to do with the platform/hardware. |
||
| Attachments: |
|
| Description |
|
In MariaDB 10.3.9, while using a subquery with group by, we get incorrect join results. The same query works fine on MariaDB 10.1.32. It also works fine without the group by. We can reproduce this with:
Results in 10.1.32 (correct):
On 10.3.9 (wrong):
The same thing happens for:
|
| Comments |
| Comment by Alice Sherepa [ 2018-10-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Please add your .cnf file(s), I could not reproduce it with the default settings
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2018-10-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I can reproduce it in MariaDB 10.3.9, 10.2.18 with "set join_cache_level=8; set join_buffer_size = 6291456;",
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Igor Babaev [ 2018-10-17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The test case for this bug was pushed into 10.3. |