[MDEV-26284] Selection having joined subselect having a left join produces wrong result in some cases Created: 2021-07-30 Updated: 2022-12-05 Resolved: 2022-12-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Subquery |
| Affects Version/s: | 10.6.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Jan Kohnert | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Hello, we stumbled over a wrong result when using a joined subquery having a left join. The query should have returned an empty result set but instead returns some (wrong) lines. The result depends on how we define the where clause in the subselect. Though just rephrasing identical logic in different ways, the results differ, and only one where-condition returns the correct result (note: the result does not even depend on thate particular where condition). Removing the left join from the subquery resolves the problem, too. I prepared a minimal example showing the bug in the attached file. We use the docker container version 10.6 of mariadb, currently it's version 10.6.3 |
| Comments |
| Comment by Alice Sherepa [ 2022-12-05 ] |
|
Currently, on 10.3 180b2bcd5389082e200f65eb-10.10 there are correct results. Sorry, that the bug was not noticed in time. |