[MDEV-12124] Probably missing optimization on MIN/MAX with LEFT JOIN on tmptable views Created: 2017-02-24 Updated: 2022-11-29 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.1.12 |
| Fix Version/s: | 10.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Julien Palard | Assignee: | Sergei Petrunia |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | view | ||
| Environment: |
Debian GNU/Linux 8.4 (jessie) |
||
| Description |
|
I think there's a possible optimisation that is not done in this case: Some setup:
The expected behavior:
Still works with merged view:
But won't work with TMPTABLE views and I don't understand why:
As far as I can see, the test_d_view can contain whatever is possible, it won't be able to change the MAX(a) value, so it should be optimized out too. |
| Comments |
| Comment by Elena Stepanova [ 2017-03-03 ] |
|
Thanks for the report. Reproducible is described, I'll leave it to psergey to decide whether there is a bug in here. |