[MDEV-21874] Window functions over a join with a view treat a null produced by outer join as a null from view, resulting in ifnull() taking values through nested result sets Created: 2020-03-04 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.1, 10.2.31, 10.4.12, 10.2, 10.3, 10.4 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Georgiy Vlasov | Assignee: | Igor Babaev |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Minimal example:
With the affected MariaDB versions, the select returns:
but I would expect it to return
Corresponding queries with other RDBMS: Return null and 999: MySQL 5.6 - it shouldn't have window functions, but it returns the same result as MariaDB http://sqlfiddle.com/#!9/7da5e/12 Return null and null: Oracle 11g R2 - http://sqlfiddle.com/#!4/18d8e/1 |
| Comments |
| Comment by Alice Sherepa [ 2020-03-05 ] | ||||||||||
|
Thanks a lot! Reproducible on 10.1-10.5, on 10.0 the query returns NULL as expected
|